You are not logged in.

#1 2009-08-05 19:19:25

oskarn
Member
From: Sweden
Registered: 2007-08-11
Posts: 27

[SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Hi

I issued a pacman -Syu and pacman required an upgrade of pacman itself, resulting in this error:

pacman: error while loading shared libraries: liblzma.so.0: cannot open shared object file: No such file or directory

I figured the easiest fix was to obtain a static binary of pacman. However, this is easier said than done when running x86_64 considering pacman.static is not maintained.

The other fix I tried was downloading liblzma and install it. This however only got me a liblzmadec.so (new name??).

I don't really feel like obtaining a live CD for something this trivial. There has to be an easier fix.

Please help!

Regards

Oskar

Last edited by oskarn (2009-08-05 22:21:43)

Offline

#2 2009-08-05 20:40:24

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

/usr/lib/liblzma.so.0 is owned by xz-utils. The latter is required by libarchive which, in turn, is a dependency of pacman.

I wonder how you ended up without xz-utils installed. hmm

Last edited by foutrelis (2009-08-05 20:40:34)

Offline

#3 2009-08-05 21:55:59

oskarn
Member
From: Sweden
Registered: 2007-08-11
Posts: 27

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

All I can think of is the pacman -Scc I did last week to free up disk space. But that should be safe, right?

edit: But when I come to think of it, this should not matter as pacman worked fine until I did pacman -Syu and pacman decided to upgrade itself

edit2: I installed xz-utils manually and pacman now works again so I could install core/xz-utils. Thanks for pointing out the required package!

Last edited by oskarn (2009-08-05 22:10:17)

Offline

#4 2009-08-05 23:56:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

The only way to have that happen is to use "d" along with your "-S" which is almost never a good thing...

Offline

#5 2009-08-06 01:06:55

dangsos
Member
Registered: 2009-03-06
Posts: 28

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Nope i just did pacman -Sy to install build-essential (trying to install aircrack-ng suite and I'm a novice to linux at best) and i deff did not have any d's in there and same problem is occuring for me....anyone care to explain how I can manually install this dependancy that is needed as I am usually pretty lost when it comes to build/makeinstalling stuff....I always mess up and I never know what I did wrong lol!

Offline

#6 2009-08-06 09:34:21

oskarn
Member
From: Sweden
Registered: 2007-08-11
Posts: 27

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

dangsos wrote:

Nope i just did pacman -Sy to install build-essential (trying to install aircrack-ng suite and I'm a novice to linux at best) and i deff did not have any d's in there and same problem is occuring for me....anyone care to explain how I can manually install this dependancy that is needed as I am usually pretty lost when it comes to build/makeinstalling stuff....I always mess up and I never know what I did wrong lol!

1. Download xz-utils from http://tukaani.org/xz/xz-4.999.8beta.tar.gz
2. Extract tarfile
  $ tar xvf xz-4.999.8beta.tar.gz
3. Build
  $ cd xz-4.999.8beta
  $ ./configure && make
4. Install
  $ sudo make install
5. Reconfigure dynamic linker bindings
  $ sudo ldconfig /usr/local/lib

Now pacman should work again. Install xz-utils using pacman:
  $ sudo pacman -S core/xz-utils

Now you can uninstall the manually installed xz-utils by vising its source directory and:
  $ sudo make uninstall

Source directory and the downloaded tarfile can now be removed and everything should be in order.

edit: Just to be safe, do another pacman -S core/xz-utils after removing the manually installed packet.

Last edited by oskarn (2009-08-06 09:37:47)

Offline

#7 2009-08-07 04:20:54

thisllub
Member
From: Northern NSW Australia
Registered: 2007-12-28
Posts: 231

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

It got me too.

Thanks.

Offline

#8 2009-08-07 08:32:57

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

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

it is probably easier and quicker to just download manually the xz-utils package, and extract manually the lib.
then pacman -Sf xz-utils


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

Offline

#9 2009-08-07 18:30:31

jealma
Member
From: The Netherlands
Registered: 2008-01-03
Posts: 71

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

I have this error too on my laptop with kde4.2. It hasn't been updated since ages (didn't use it for a while), and now while updating, there was a new pacman. After upgrading, I have the same error.

Offline

#10 2009-09-11 17:11:37

chender
Member
From: Toronto, Canada
Registered: 2008-11-24
Posts: 41
Website

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

I just hit the same error as oskarn.  thanks to oskarn again for the fix above which worked perfectly for me.  I checked my history, and only had done -Sy while I was installing libraries for alsa to try and get it to work.  Strange but thanks to this forum for getting me fixed.


--
thinkpad X60s [t400s coming soon] | archlinux i686 | xmonad | dmenu |

Offline

#11 2010-10-28 10:57:47

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

> 1. Download xz-utils from http://tukaani.org/xz/xz-4.999.8beta.tar.gz
It's not there any more. Tried with v5, didn't work. I have the same problem as topicstarter described. Please help.

Offline

#12 2010-10-28 13:14:22

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

xz-utils got renamed to xz. Get it from a repo server.

Offline

#13 2010-10-29 14:48:37

trungpham
Member
Registered: 2010-10-21
Posts: 28

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

I have the same problem. even v5 from repo didnt work.
I used "sudo tar -xvpf /var/cache/pacman/pkg/xz*.gz -C / --exclude .PKGINFO --exclude .INSTALL". It didnt work
pacman is dead man.plz help.

Last edited by trungpham (2010-10-29 14:59:08)

Offline

#14 2010-10-29 15:17:50

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Guys, this thread is over a year old, and was solved by manually untaring xz to root.

If that does not work in your case, please open a new thread and provide more details. I can't see why the provided solution should not work though, make sure you are using the current version when untaring them (cache/pacman/pkg/xz*.gz looks a bit troublesome) and maybe manually extract pacman and libarchive as well.

https://wiki.archlinux.org/index.php/Pa … tall_it.3F

Offline

#15 2010-10-29 15:20:49

trungpham
Member
Registered: 2010-10-21
Posts: 28

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Thank for your quick reply . I found a solution "sudo mv /usr/lib/liblzma.so /usr/lib/liblzma.so.0" pacman is alive again.

Offline

#16 2010-10-29 15:29:05

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Well, I wouldn't call that a solution... but if you got pacman back, update (from an up2date mirror!) and force a reinstall of pacman, libarchive and xz and yo should be good.

Offline

#17 2010-10-29 15:41:24

trungpham
Member
Registered: 2010-10-21
Posts: 28

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Yep. Its just a temporary solution and can be troublesome in the future. reinstalling is the best. thks dude

Offline

#18 2010-10-29 17:28:35

desaparecido
Member
From: Liège, Belgium
Registered: 2010-03-14
Posts: 155

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

trungpham wrote:

Yep. Its just a temporary solution and can be troublesome in the future. reinstalling is the best. thks dude

you don't need re-install your system, this solution works fine for me.. with the xz pkg (ver 5.0.0) in your root system and with that command... xz and libarchive and GO ! 

good luck


KF5 & Plasma5 (git versions) - Awesome WM
ASUS Sabertooth 990FX - AMD FX8350 - ATI Radeon HD 7970
[testing] repo

Offline

#19 2010-10-29 20:05:05

ybotspawn
Member
From: Oz
Registered: 2008-04-06
Posts: 140

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

easier and a little safer solution:

sudo ln -s /usr/lib/liblzma.so /usr/lib/liblzma.so.0

solves it as well


"As long as people are going to call you a lunatic anyway,
why not get the benefit of it? It liberates you from convention. "

Offline

#20 2010-10-29 20:18:29

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Again, this is not solving the underlying problem - your pacman/libarchive somehow looking for libzlma.so.0 instead of liblzma.so.05 (which it does here).

Offline

#21 2010-10-30 14:30:20

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Got this on a new install too, xz package had been added by the installer.  Symlinked it (at least, for now).  Not exactly sure what I have to do.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#22 2010-10-30 14:52:19

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

Run a full system update and remove the symlink afterwards should work.
What iso did you use, and did this happen the first time you tried to use pacman after the install? Odd that it would only update xz but not the rest. Maybe file a bug to have the symlink included with xz, although they may be more clever solutions...

EDIT: with the xz update to 5.0 on 24/10/2010, it provides libmlmza.so.5 (instead of libmlmza.so.0 in the previous package). libarchive has been bumped the same day to link on the correct lib. so if you update libarchive, it would pull the correct xz version, but if you update xz only, libarchive breaks.

Last edited by hokasch (2010-10-30 15:06:37)

Offline

#23 2010-10-30 21:47:57

mschu
Member
Registered: 2009-03-13
Posts: 16
Website

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

hokasch wrote:

with the xz update to 5.0 on 24/10/2010, it provides libmlmza.so.5 (instead of libmlmza.so.0 in the previous package). libarchive has been bumped the same day to link on the correct lib. so if you update libarchive, it would pull the correct xz version, but if you update xz only, libarchive breaks.

Either libarchive seems to be out of sync with xz on some mirrors, or KDE apps (in my case) need liblmza.so.0 directly and X refuses to start up when it is not found. Linking liblmza.so to liblmza.so.0 works.

Offline

#24 2010-10-30 22:00:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

DO a full system upgrade and you will avoid such issues.

Offline

#25 2010-11-02 03:59:32

vadmium
Member
Registered: 2010-11-02
Posts: 63

Re: [SOLVED] pacman: error while loading shared libraries: liblzma.so.0

I'm still learning how package versioning works with Arch.

Originally on my installation:
1. pacman (3.4.1-1) needs libarchive.so.2; package depends on libarchive >= 2.7.1
2. libarchive (2.8.3-3) needs liblzma.so.0; depends on xz-utils (no specific version)
3. xz-utils (4.999.9beta-2) provides liblzma.so.0

After package upgrades and problems being ironed out:
1. pacman unchanged; still needs libarchive.so.2 >= 2.7.1
2. libarchive (2.8.4-2) needs liblzma.so.5; package depends on xz >= 5.0.0
3. xz (5.0.0-1) provides liblzma.so.5; package replaces and provides xz-utils

I think I caused liblzma to be replaced without libarchive being touched, by installing other packages. Perhaps I should have noticed the issue because Pacman said it was going to bump the major version number, but I assumed everything would be okay:

Remove: xz-utils-4.999.9beta-2

Total Removed Size:   0.85 MB

Targets: xz-5.0.0-1 . . .

Perhaps is there a way to make the xz package upgrade force libarchive to be upgraded as well. Maybe saying that xz doesn't actually "provide" xz-utils maybe? Or is there a field to say xz 5 will break libarchive 2.8.3? Or is Pacman not "smart" enough to handle this situation?

Offline

Board footer

Powered by FluxBB