How do I resolve a "Cannot open shared object file libudev.so.0" error?
Solution 1
For 64-bit Ubuntu, it is in the 32-bit libudev0 package.
You can install that with the following command:
sudo apt-get install libudev0:i386
This package was removed from Ubuntu in 14.04. You will need to install it from an older version.
Solution 2
To fix, I linked libudev.so.1
to libudev.so.0
:
sudo ln -sf /lib/$(arch)-linux-gnu/libudev.so.1 /lib/$(arch)-linux-gnu/libudev.so.0
Solution 3
For ubuntu 14.04 and above
The easiest method I found was to just download the .deb (direct link to 64-bit download and to 32-bit download) and double click it to install it or use dpkg to install it:
dpkg -i libudev0_175-0ubuntu9_amd64.deb
For previous versions
In previous version of ubuntu this package was available in the official repositories. You can install with the following:
sudo apt-get install libudev0:i386
Solution 4
I had the same problem for a different program, but Sean's accepted answer didn't help me at all. On my upgraded install of 64-bit 13.04, libudev0 is not available either in 64-bit form or i386 form. And ia32-libs is already installed. So no dice.
What I had to do was a slightly modified version senshikaze's more technical solution. I manually symlinked libudev.so.0 to libudev.so.1 in the x86_64 lib directory, thusly:
cd /lib/x86_64-linux-gnu/
sudo ln -sf libudev.so.1 libudev.so.0
This fixed it for me.
Solution 5
This error might happen when trying to use nw executable from Node Webkit. Like this:
./nw: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
How to solve:
Get hex editor that allows you to change ASCII string of binary, eg. hexedit:
- In terminal(Ctrl+Alt+T), run:
sudo apt-get install hexedit
. - Follow instructions presented in terminal(type password if needed, confirm install).
- In terminal(Ctrl+Alt+T), run:
- Go to directory with node webkit:
- In my case:
cd ~/Dokumenty/node-webkit-*
.
- In my case:
- Open nw binary using hex editor command preceded with
sudo
:- Run:
sudo hexedit nw
.
- Run:
- Search for
libudev.so.0
as ASCII string:- If using hexedit: Press Tab.
- Press Ctrl+S.
- Type:
libudev.so.0
.
- Change
0
inlibudev.so.0
string to1
, so it becomes:libudev.so.1
:- Use arrow keys to select
0
inlibudev.so.0
string. - Press 1 on keyboard.
- Use arrow keys to select
- Exit and save changes.
- Press Ctrl+X.
- Press Y to save changes.
You're done. This also fixes problem with Atraci binary when following same instructions except hex editing Atraci file instead of nw.
Related videos on Youtube
Christian Smith
Updated on September 18, 2022Comments
-
Christian Smith over 1 year
Trying to run Game Dev Tycoon on Ubuntu 64. It asks for the above object.
I ran
sudo apt-get install libudev1:i386
and it came back already installed.I have
/lib/i386-linux-gnu/libudev.so.1
but nolibudev.so.0
anywhere.-
igorsantos07 over 8 yearsThis happened when trying to install the new version of Popcorntime on Mint Petra 16
-
-
Stefano over 10 yearsfor 64 bit: sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0
-
user214274 over 10 yearscd /lib/x86_64-linux-gnu/ sudo cp libudev.so.0.13.0 libudev.so.1
-
dobey over 10 yearsPlease do not do this. It is only asking for problems.
-
Johan Bjäreholt about 10 yearsThis messed up Plex Home Theatre for me, to revert remove libudev.so.0 symlink and reinstall libudev0:i386
-
John Frost almost 10 yearsno package found when trying to looking for libudev0:i386 any ideas ?
-
Phil Strong almost 10 yearsI ended up doing sudo apt-get install libudev1:i386 and then sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0
-
amit_saxena over 9 yearsOn 32 bit this is the command (in case someone reached here):
sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
-
That Brazilian Guy over 9 yearsThis command isn't working for me: on Precise 32 bits, the files are on
/lib/i386
, but$(arch)
isi686
. And I have libudev0 but not libudev1, so I had to link the other way round. -
Catalyst over 9 years
cat nw | sed s/libudev.so.0/libudev.so.1/ > fixed_nw
,chmod a+x fixed_nw
and then you can run it, no need to install anything -
berbt about 9 yearsTHIS IS THE RIGHT ANSWER. If a package is missing, you install the package... is that simple. Creating links, hex-editing names, reconfiguring Google Chrome, hammering the CPU and snorting chilli powder are not real solutions.
-
berbt about 9 yearsListen to dobey, this is a messy procedure. Ryan Crichton posted the right way to do it HERE.
-
Flimm about 9 yearsI like this idea, although I wonder if there is a way to use LD_LIBRARY environment variable instead.
-
TenLeftFingers about 9 years@Flimm, let me know how you get on.
-
Flimm about 9 yearsI ended up going with this answer instead.
-
HoboBen over 8 yearsI had to enter this command to get google-webdesigner to install on Debian 64 bit
-
Asela Sampath over 8 yearsThis fixed it for me too - running Ubuntu 15.04 64 bit. Thanks a bunch.
-
Asela Sampath over 8 yearsBut it only works if that package is available.
-
rubo77 over 8 yearsThe old versions are available here: packages.ubuntu.com/precise/libudev0
-
rubo77 over 8 yearsPlease install the old version from here: packages.ubuntu.com/precise/libudev0
-
lord-ralf-adolf over 8 yearsThis should be the right answer ! this is the proper fix ,no messy symlinks or whatsoever
-
denny over 8 yearsThis is the easiest method that I can find. Adding older dependency to repository is a pain
-
Spl2nky over 8 yearsThanks it is working in my Ubuntu 14.04 :) (Popcorn Time Issue)
-
Nikos Grigoriadis almost 8 yearsWorked like a charm, and this is the way to go. No links, no hassle. Thanks!
-
Aaron Franke over 7 yearsPackage libudev0 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
-
aggsol over 7 yearsThis works for STEAM!
-
Adrians Netlis about 7 yearsThis breaks your system. For me it is not just unity not working, but wlan broke too... :(
-
Raj over 5 yearsThe solution from @PhilStrong worked for me 100%
-
Alexander Haroldo da Rocha almost 5 yearsFixed on Ubuntu 19.04
-
kissu almost 3 yearsSince the URL will pretty much often 404 as distro versions will increase, here is the non-specific link to it: packages.ubuntu.com/…