Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 no libudev.so.0 anywhere.

share|improve this question
    
This happened when trying to install the new version of Popcorntime on Mint Petra 16 – igorsantos07 Dec 18 '15 at 21:01

15 Answers 15

up vote 21 down vote accepted

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.

share|improve this answer
    
Oh, that's a much better solution, thanks! – senshikaze May 2 '13 at 17:07
3  
no package found when trying to looking for libudev0:i386 any ideas ? – Jonathan Jun 3 '14 at 21:10
16  
I 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 – Phil Strong Jul 9 '14 at 15:56
    
helped me , thanks – dzgeek Jan 15 '15 at 10:35
2  
Please install the old version from here: packages.ubuntu.com/precise/libudev0 – rubo77 Oct 30 '15 at 15:59

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
share|improve this answer
21  
for 64 bit: sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0 – Pisu Aug 17 '13 at 20:51
10  
Please do not do this. It is only asking for problems. – dobey Dec 11 '13 at 20:41
1  
This messed up Plex Home Theatre for me, to revert remove libudev.so.0 symlink and reinstall libudev0:i386 – Johan Bjäreholt Mar 11 '14 at 15:36
    
On 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 – amit_saxena Oct 1 '14 at 22:49
5  
Listen to dobey, this is a messy procedure. Ryan Crichton posted the right way to do it HERE. – berbt Apr 7 '15 at 20:00

For ubuntu 14.04 and above

The easiest method I found was to just download the .deb 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
share|improve this answer
10  
THIS 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 Apr 7 '15 at 19:53
1  
But it only works if that package is available. – Tamsyn Michael Sep 22 '15 at 2:39
    
@TamsynMichael the package doesn't have to be available in the repositories, you can download it from the link above and then install it manually on ubuntu versions that don't have the package available in their official repositories. – Ryan Crichton Sep 23 '15 at 18:57
    
This should be the right answer ! this is the proper fix ,no messy symlinks or whatsoever – lord-ralf-adolf Nov 1 '15 at 11:09
    
This is the easiest method that I can find. Adding older dependency to repository is a pain – denny Dec 14 '15 at 23:16

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.

share|improve this answer
    
This fixed it for me too - running Ubuntu 15.04 64 bit. Thanks a bunch. – Tamsyn Michael Sep 22 '15 at 2:39

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:

  1. 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).
  2. Go to directory with node webkit:
    • In my case: cd ~/Dokumenty/node-webkit-*.
  3. Open nw binary using hex editor command preceded with sudo:
    • Run: sudo hexedit nw.
  4. Search for libudev.so.0 as ASCII string:
    • If using hexedit: Press Tab.
    • Press Ctrl+S.
    • Type: libudev.so.0.
  5. Change 0 in libudev.so.0 string to 1, so it becomes: libudev.so.1:
    • Use arrow keys to select 0 in libudev.so.0 string.
    • Press 1 on keyboard.
  6. 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.

share|improve this answer
2  
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 – Catalyst Jan 31 '15 at 5:50

The only answer here that works on Ubuntu 14.04 is the accepted answer, and since many comments point out that this can cause issues with the system down the road (although I don't know about that myself) I came up with a compromise. This script will prompt (in the terminal) for your root password. It will create the symbolic link and launch the application (in my case, popcorn time). When you quit the application, it will use the existing sudo session to remove the symbolic link:

#!/bin/sh
sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
./Popcorn-Time #replace this line with the path to the executable you want to launch
sudo rm /lib/i386-linux-gnu/libudev.so.0
share|improve this answer
    
I like this idea, although I wonder if there is a way to use LD_LIBRARY environment variable instead. – Flimm Apr 28 '15 at 21:19
    
@Flimm, let me know how you get on. – TenLeftFingers Apr 30 '15 at 13:11
1  
I ended up going with this answer instead. – Flimm Apr 30 '15 at 13:15

I just found a way to make this work, is pretty silly though.

I have Google Chrome installed on my system and Chrome has this shared object embedded. So, I just had to make a symbolic link to the library on Chrome installation directory.

ln -sf /opt/google/chrome/libudev.so.0 /lib/x86_64-linux-gnu/libudev.so.0

It works pretty fine for me.

share|improve this answer

This was simplest solution I found

sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0
share|improve this answer

i did this on 14.04, but should be similar. just delete the package and re-install. the correct libraries are installed appropriately.

apt-get purge google-chrome-stable
apt-get install google-chrome-stable

i'm sure the other answers work, but i have a basic beef in modifying file system objects that are managed by configuration management packages.

share|improve this answer

UPDATE I made a bash script to wrap around the program you want to execute. You can add it to your local bin folder and just start the program without the copy & pasting or running shell scripts.

#!/bin/bash

ProgramToExecute="/PATH/TO/PROGRAM" #Example: $HOME/dart/./DartEditor

system=$(uname -m) #Returns x86_64 on 64 bit systems
libdir="/lib/$system-linux-gnu"
libudev1="$libdir/libudev.so.1"

if [ ! -f $libudev1 ]
then
        #check if an i386 folder exist because ' uname -m' returns i686 instead of i386.
        libdir="/lib/i386-linux-gnu"
        libudev1="$libdir/libudev.so.1"
        #if none of the lookups return a file, this script exits,
        BreakUpNotice="This $libudev1 isn't working out. It's not you
        it's me. Or maybe you forgot to install libudev1 library.
        sudo apt-get install libudev1 "

        [ ! -f $libudev1 ] && echo $BreakUpNotice  && exit 0
fi

libudev0="$libdir/libudev.so.0"

echo "$libudev1 found."
sudo ln -sf $libudev1 $libudev0
sudo -k #revoke sudo 
$($ProgramToExecute)

NoticeAfterExec="Enter sudo to del libudev link (recommended) or press CTRL+C to cancel."
RmSuccess="And $libudev0 link is gone."
RmFailed="Whaat? $libudev0 still exists."

echo $NoticeAfterExec
sudo rm $libudev0
sudo -k
[ ! -f "$libudev0" ]  && echo $RmSuccess || echo $RmFailed
exit 

OLD ANSWER In Ubuntu 14.04 I was getting the error message from the Dart Editor when trying to use Live Preview (Chromium). The error was solved by installing libudev1 and creating a symbolic link.

    sudo apt-get install libudev1

I also used the script mentioned above by TenLeftFingers to execute DartEditor.

    #!/bin/sh
    sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
    ./DartEditor
    sudo rm /lib/i386-linux-gnu/libudev.so.0

If the Dart Editor doesn't execute make sure JAVA is installed and that is not a permission issue.

    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer

and make the IDE executable:

    sudo chmod a+x ./DartEditor

This worked for me.

share|improve this answer

I was getting the same error on my 32-bit system after upgrading from Xubuntu Precise to Trusty. This fixed it for me:

sudo dpkg-reconfigure google-chrome-stable

I found it here. With absolutely no parameters, I'm not quite sure how this fixed it, but it did. What I liked best is that it didn't require doing anything that would potentially cause problems for me in the future, and didn't require me hunting down any packages.

share|improve this answer

as Phil Strong pointed out

install libudev.so.1

sudo apt-get install libudev1:i386

then link it as libudev.so.0

sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0
share|improve this answer

This is what I used to solve the same problem on 32 bit Ubuntu 15.04.

cd i386-linux-gnu
sudo ln -sf libudev.so.1 libudev.so.0
share|improve this answer

If anyone stumble upon this page while digging the web for fixes on the libudev.so.0 & the Emotiv Epoc SDK Dev Edition on Ubuntu, I hope the following will help:

// my config is 64bit Ubuntu 13.04

For a 64-bit system:

sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1. /lib/x86_64-linux-gnu/libudev.so.1

sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

what allows to prevent the "error while loading shared libraries: libudev.so.0: wrong ELF class: ELFCLASS32"

sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /usr/lib/libudev.so.0

For a 32-bit system:

sudo ln -sf /lib/i386-linux-gnu/libudev.so.1. /lib/i386-linux-gnu/libudev.so.1

sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0

what allows to prevent the "error while loading shared libraries: libudev.so.0: wrong ELF class: ELFCLASS64" ( note that's a guess, I'm on a 64 bit system )

sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /usr/lib/libudev.so.0

The EmotivControlPanel, EmoKey, EmoComposer, the Java examples & little customized Qt examples should be able tu run after doing the above ( I already tried all the steps above + others found on the web ( stack overflow, .. ), but none were working for me, so that's what I ended up doing after some "try & errors"

Last but not least, If anyone here knows how to run programs compiled against 32bit libs on a 64bit system WHILE SPECIFYING TO USE A PROVIDED 3RD PARTY 32BIT LIBRARY ?

more precisely, for those who knows what I'm talking about, how am I supposed to run the "EmoCube" & "BlueAvatar" Qt examples on my 64bit system ?

--> for what I've tried so far, the most I could get was: "error while loading shared libraries: libedk.so.1: wrong ELF class: ELFCLASS64"

I guess that a symlink to that lib in the i386 directory wouldn't make it ( although I did not try it yet ), so if anyone has an answer ... I.m looking forward to reading it.

Cheers all +

share|improve this answer

Run these commands in a terminal:

cd /lib/x86_64-linux-gnu/
sudo cp libudev.so.0.13.0 libudev.so.1

This has helped me

share|improve this answer
    
cd /lib/x86_64-linux-gnu/ sudo cp libudev.so.0.13.0 libudev.so.1 – user214274 Nov 10 '13 at 6:04

protected by heemayl Jan 9 at 21:29

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.