You are not logged in.

#1 2009-09-29 15:16:22

antee
Member
Registered: 2009-08-12
Posts: 16

Pacman doesn't work [Solved]

http://pastebin.com/m4d82e32d

That's the error(s) I get. Can't seem to figure out the problem, any ideas? Thanks.

Last edited by antee (2009-09-30 14:13:19)

Offline

#2 2009-09-29 15:49:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Pacman doesn't work [Solved]

file /usr/bin/pacman and paste the result


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2009-09-29 16:15:10

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

anton ~  $  file /usr/bin/pacman
/usr/bin/pacman: data

Offline

#4 2009-09-30 02:29:42

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Pacman doesn't work [Solved]

looks like your pacman binary got corrupted. Try:
# pacman.static -S pacman

Offline

#5 2009-09-30 07:02:24

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

anton ~  $  pacman.static -S pacman
bash: pacman.static: command not found

Offline

#6 2009-09-30 07:23:16

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

Re: Pacman doesn't work [Solved]

What does this show ?
$ head -n 40 /usr/bin/pacman


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

Offline

#7 2009-09-30 07:29:00

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

anton ~  $  head -n 40 /usr/bin/pacman
%DEPENDS%
emacs
ghostscript
texlive-core
texinfo
poppler

%FILENAME%
compiz-decorator-kde-0.8.2-1.pkg.tar.gz

%NAME%
compiz-decorator-kde

%VERSION%
0.8.2-1

%DESC%
Decorator of Compiz for KDE

%GROUPS%
compiz
compiz-kde

%CSIZE%
71743

%ISIZE%
212992

%MD5SUM%
22cb7023974ae1068be44a1a73b42648

%URL%
http://www.go-compiz.org/

%LICENSE%
GPL2
LGPL2
MIT

Offline

#8 2009-09-30 08:22:27

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Pacman doesn't work [Solved]

I would restore pacman from an existing pkg and reinstall for consistency.

tar -pxvf /var/cache/pacman/pkg/pacman-<version>-<arch>-pkg.tar.gz -C / usr/bin/pacman
pacman -S pacman

Hopefully /usr/bin/pacman is the only thing which was corrupted...

Offline

#9 2009-09-30 08:37:11

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

Re: Pacman doesn't work [Solved]

Before doing that, could you save your whole bogus pacman file ? It is quite interesting tongue

How did you manage to overwrite /usr/bin/pacman with the contents of /var/lib/pacman/sync/community/compiz-decorator-kde-0.8.2-1/desc ??

Maybe you should also check your shell history. Like history | grep pacman or history 0 | grep pacman


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

Offline

#10 2009-09-30 12:56:46

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

anton ~  $  tar -pxvf /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz -C /usr/bin/pacman pacman -S pacman
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: pacman: Not found in archive
tar: pacman: Not found in archive
tar: Exiting with failure status due to previous errors

sad

Offline

#11 2009-09-30 13:00:03

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

Re: Pacman doesn't work [Solved]

could you send me your pacman-3.3.1-1-x86_64.pkg.tar.gz package and your /usr/bin/pacman file by mail ? (just click on my name, the gmail address is in my profile)


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

Offline

#12 2009-09-30 13:04:18

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Pacman doesn't work [Solved]

The command you've posted is incorrect.  The code in my post above is in fact two commands.  If possible, please paste the line below to ensure formatting is correct.  If that completes successfully, you should then use 'pacman -S pacman'.

tar -pxvf /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz -C / usr/bin/pacman

Last edited by chpln (2009-09-30 13:04:43)

Offline

#13 2009-09-30 13:08:08

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

anton ~  $  tar -pxvf /var/cache/pacman/pkg/pacman-3.3.0-3-x86_64.pkg.tar.gz -C /usr/bin/pacman
tar: /usr/bin/pacman: Cannot chdir: Not a directory
tar: Error is not recoverable: exiting now

Offline

#14 2009-09-30 13:10:39

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Pacman doesn't work [Solved]

Note the space between the "-C /" and "usr/bin/pacman".

The former indicates the working directory, the latter is the file to extract.

Offline

#15 2009-09-30 13:13:24

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

Saw that, but that didn't work either...

anton ~  $  tar -pxvf /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz -C / usr/bin/pacman

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: usr/bin/pacman: Not found in archive
tar: Exiting with failure status due to previous errors

Offline

#16 2009-09-30 13:22:26

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Pacman doesn't work [Solved]

The exact command executes without issue here.  The fact it's attempting to read from stdin is most unusual.

Perhaps shining can find an anomaly with that package.  Can you post the results of:

md5sum /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz

Last edited by chpln (2009-09-30 13:24:08)

Offline

#17 2009-09-30 13:31:21

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

anton ~  $  md5sum /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz
b0e6ab10e86dfd81e3393b2120052eb1  /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz

Offline

#18 2009-09-30 13:33:48

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

Re: Pacman doesn't work [Solved]

Both pacman-3.3.1-1-x86_64.pkg.tar.gz package and / usr/bin/pacman are completely broken.
And both seem to contain information from pacman databases.
I still wonder how antee managed to do that, it is a big mystery smile

Also the package is completely corrupted, it seems to be neither a tar.gz nor a tar file. Or maybe it's a bit of everything.
But opening it in a text editor, I also found traces of a pacman database

To antee, I would suggest re-downloading the whole pacman package and extracting everything , not only usr/bin/pacman
$ tar -pxvf /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz -C /


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

Offline

#19 2009-09-30 13:35:32

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Pacman doesn't work [Solved]

OK, the package you have seems corrupted.  The results here:

 md5sum /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz                     
bbb90ad4c3296c1c3cea47597857c3d4  /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz

Please see if you can find the package on a different mirror, and attempt to extract from that.  Would be interesting to know what might have caused all this strangeness...

EDIT:
Beaten smile

Last edited by chpln (2009-09-30 13:40:49)

Offline

#20 2009-09-30 13:41:43

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Pacman doesn't work [Solved]

I'm concerned that this problem may extend farther than just the pacman binary and package - you may want to validate other packages in your cache (md5sum and compare with a known-good source)

Offline

#21 2009-09-30 13:44:22

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

shining wrote:

To antee, I would suggest re-downloading the whole pacman package and extracting everything , not only usr/bin/pacman
$ tar -pxvf /var/cache/pacman/pkg/pacman-3.3.1-1-x86_64.pkg.tar.gz -C /

Where do I find the file to replace the old one with?

Offline

#22 2009-09-30 13:55:17

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Pacman doesn't work [Solved]

Try this one: http://mirror.internode.on.net/pub/arch … pkg.tar.gz

Cerebral wrote:

I'm concerned that this problem may extend farther than just the pacman binary and package - you may want to validate other packages in your cache (md5sum and compare with a known-good source)

I completely agree with this.  Where might a full list of package checksums be found?

Last edited by chpln (2009-09-30 13:59:13)

Offline

#23 2009-09-30 14:01:11

antee
Member
Registered: 2009-08-12
Posts: 16

Re: Pacman doesn't work [Solved]

Thanks guys, pacman seems to be working now.

Offline

#24 2009-09-30 14:44:40

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

Re: Pacman doesn't work [Solved]

Since you extracted pacman manually, you should now run : pacman -Sf pacman
to reinstall it properly.

Otherwise, you can check all your package integrity using info from there :
http://wiki.archlinux.org/index.php/Pac … re_Restore

$ comm -13 <(pacman -Qmq | sort) <(pacman -Qq | sort) > pkglist
$ pacman -Sw $(cat pkglist)

replace -Sw by -S if you want to reinstall everything instead of just checking integrity.

If you want to make sure your sync databases with all md5sum info are fine, check the mirror you are using and do pacman -Syy.

Finally, it might be worth checking these two commands :
$ testdb
$ pacman -Qk


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

Offline

Board footer

Powered by FluxBB