You are not logged in.

#1 2008-03-22 03:37:10

nyfair
Member
Registered: 2008-03-22
Posts: 5

[SOLVED] pacman hanged when install or remove packages

when I use pacman -S , it only shows "resolving dependencies...". If I use pacman -R , it hangs at "checking dependencies..."
I have tried to overwrit the programme with extracted the package manually, it didn't help me.How can I resolve the problem

Last edited by nyfair (2008-03-25 14:16:21)

Offline

#2 2008-03-22 05:21:10

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: [SOLVED] pacman hanged when install or remove packages

What does adding the "--debug" flag output?

Offline

#3 2008-03-22 14:22:02

nyfair
Member
Registered: 2008-03-22
Posts: 5

Re: [SOLVED] pacman hanged when install or remove packages

sudo pacman -S pacman --debug

debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: new section 'testing'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'testing'
debug: opening database 'testing'
debug: opening database from path '/var/lib/pacman/sync/testing/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server to database 'testing': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/testing/os/x86_64'
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'core'
debug: registering sync database 'core'
debug: opening database 'core'
debug: opening database from path '/var/lib/pacman/sync/core/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server to database 'core': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/core/os/x86_64'
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: opening database 'extra'
debug: opening database from path '/var/lib/pacman/sync/extra/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server to database 'extra': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/extra/os/x86_64'
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: opening database 'community'
debug: opening database from path '/var/lib/pacman/sync/community/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server to database 'community': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/community/os/x86_64'
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
debug: opening database 'local'
debug: opening database from path '/var/lib/pacman/local/'
debug: loading package cache for repository 'testing'
debug: loading package cache for repository 'core'
debug: loading package cache for repository 'local'
warning: pacman-3.1.3-1 is up to date -- reinstalling
debug: package 'pacman' not found in sync
debug: adding target 'pacman' to the transaction set
resolving dependencies...
debug: resolving target's dependencies
debug: started resolving dependencies
debug: checkdeps: package pacman-3.1.3-1

then the programme hanged


after I press ctrl+c, it shows

debug: returning error 29 from alpm_trans_interrupt : operation not compatible with the transaction type
debug: closing database 'local'
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: closing database 'testing'
debug: unregistering database 'testing'
debug: freeing package cache for repository 'testing'
debug: closing database 'core'
debug: unregistering database 'core'
debug: freeing package cache for repository 'core'
debug: closing database 'extra'
debug: unregistering database 'extra'
debug: closing database 'community'
debug: unregistering database 'community'

Offline

#4 2008-03-22 15:06:08

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: [SOLVED] pacman hanged when install or remove packages

nyfair wrote:

debug: package 'pacman' not found in sync

Try a "pacman -Syy"

Offline

#5 2008-03-23 02:29:20

nyfair
Member
Registered: 2008-03-22
Posts: 5

Re: [SOLVED] pacman hanged when install or remove packages

I have tried this, pacman can Synchoronizing package databases correctly and shows "local database is up to date", but it still hangs when install packages. And with "--debug" flag, it also shows the same

Last edited by nyfair (2008-03-23 02:31:42)

Offline

#6 2008-03-23 18:02:27

ekerazha
Member
Registered: 2007-02-27
Posts: 290

Re: [SOLVED] pacman hanged when install or remove packages

This is a common (and already discussed) issue because the pacman database implementation is very slow, especially on some filesystems like XFS.

However, you could try

pacman-optimize

Last edited by ekerazha (2008-03-23 18:03:19)

Offline

#7 2008-03-24 09:56:47

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED] pacman hanged when install or remove packages

ekerazha wrote:

This is a common (and already discussed) issue because the pacman database implementation is very slow, especially on some filesystems like XFS.

However, you could try

pacman-optimize

nyfair, is it just very slow, or does it really hang?
How long did you let pacman run?
And maybe you could check cpu and disk usage while pacman is running to get a better idea of what it's doing.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#8 2008-03-24 12:35:30

nyfair
Member
Registered: 2008-03-22
Posts: 5

Re: [SOLVED] pacman hanged when install or remove packages

This isn't the first time I use pacman and the problem just appeared 3 days ago.
There's no problem on cpu and disk usage.
I have tried to overwrite the programme by extracting files from the package, but it didn't help.
So I think it is really hang because it even can't create lock file after 2 hours running

Offline

#9 2008-03-24 12:40:16

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: [SOLVED] pacman hanged when install or remove packages

nyfair wrote:

So I think it is really hang because it even can't create lock file after 2 hours running

In that case, it could possibly be a change in lock folder permissions.

What does "ls -l /var" output?


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#10 2008-03-24 13:37:02

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED] pacman hanged when install or remove packages

Well what did you do 3 days ago ? smile
Maybe check which packages you upgraded just before it started (in /var/log/pacman.log)
And what is your partition / filesystem setup?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#11 2008-03-24 16:37:34

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED] pacman hanged when install or remove packages

Spider.007 wrote:

my pacman instance hangs as well when installing a new package; it is caused by ftp.archlinux.org being unreachable; even though there is an huge list of alternative servers? Here is the [last part of the] output of --debug:

What does this have to do with the original issue? (well, I can answer for you : nothing)
And why do you use ftp.archlinux.org instead of one server from the huge list of alternative ones?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#12 2008-03-24 16:40:31

Spider.007
Member
Registered: 2004-06-20
Posts: 819
Website

Re: [SOLVED] pacman hanged when install or remove packages

Hmm; I thought it was related and thus might help finding a solution. After reading this thread again I see you are right; so I have removed my posting

And the reason for using ftp.archlinux.org is that I got tired manually upgrading the mirrorlist file. It would be nice if the complete list was separated from the preferred-locations-list; which would allow for upgrading of the mirrorlist without the need for manually merging pacold and pacnew files

Last edited by Spider.007 (2008-03-24 16:44:48)

Offline

#13 2008-03-25 14:15:15

nyfair
Member
Registered: 2008-03-22
Posts: 5

Re: [SOLVED] pacman hanged when install or remove packages

shining wrote:

Well what did you do 3 days ago ? smile
Maybe check which packages you upgraded just before it started (in /var/log/pacman.log)
And what is your partition / filesystem setup?

Oh,thanks.Manually reinstall all the packages changed that day solves the problem,maybe some packages didn't upgrade properly.

Last edited by nyfair (2008-03-25 14:17:23)

Offline

#14 2008-03-25 16:28:50

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED] pacman hanged when install or remove packages

Spider.007 wrote:

And the reason for using ftp.archlinux.org is that I got tired manually upgrading the mirrorlist file. It would be nice if the complete list was separated from the preferred-locations-list; which would allow for upgrading of the mirrorlist without the need for manually merging pacold and pacnew files

You can do it yourself. Simply add "Include /etc/pacman.d/preferred"
before any "Include /etc/pacman.d/mirrorlist" lines in pacman.conf.
Then just put your preferred mirrors in that new file.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#15 2008-03-26 09:27:02

Spider.007
Member
Registered: 2004-06-20
Posts: 819
Website

Re: [SOLVED] pacman hanged when install or remove packages

shining wrote:
Spider.007 wrote:

And the reason for using ftp.archlinux.org is that I got tired manually upgrading the mirrorlist file. It would be nice if the complete list was separated from the preferred-locations-list; which would allow for upgrading of the mirrorlist without the need for manually merging pacold and pacnew files

You can do it yourself. Simply add "Include /etc/pacman.d/preferred"
before any "Include /etc/pacman.d/mirrorlist" lines in pacman.conf.
Then just put your preferred mirrors in that new file.

Hmm; I never thought of that; thanks!

Offline

Board footer

Powered by FluxBB