/sbin/init: error while loading shared libraries: libdbus-1.so.3: cannot open shared object or file: No such file or directory

Asked by bhaskar

I am the newbie to ubuntu and recently i installed ubuntu 11.04 natty Narwal on my dell laptop. The installed ubuntu works fine until today, but i tried to install file libc.so.6 in shared library and in this process i had done some mistake and that i don't know what exactly it is. Now i tried to restart my computer and every time it was not booting either through graphical or recovery mode and in both processes i got the error like this "/sbin/init: error while loading shared libraries: libdbus-1.so.3: cannot open shared object or file: No such file or directory ", even i tried with live cd still i was not able to recover from this problem.
Please give me a solution to the above problem and i don't want to reinstall ubuntu again and again.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu dbus Edit question
Assignee:
No assignee Edit question
Solved by:
bhaskar
Solved:
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

"i tried to install file libc.so.6 in shared library and in this process i had done some mistake and that i don't know what exactly it is"

Can you be more specific? What was it you were trying to do? Were you following instructions somewhere?

In addition to providing that information, please also open a Terminal window and run these commands, one after the other, in this order:

apt-cache policy libdbus-1-3 ia32-libs libc6 libc6-\*
locate libdbus-1.so.3 libc.so.6
sudo updatedb
locate libdbus-1.so.3 libc.so.6

To run a command, paste it into the Terminal (this is preferable to typing it in by hand as it's faster and easier and the risk of mistakes is much smaller) and press enter. It is intentional that the second and fourth command are identical. They might produce identical output, or they might not. You may be prompted for your password when you run the third command. As you enter it, you won't see any placeholder characters (like *). That's OK, just type it in and press enter. This third command might take only a short time to complete, or it might take a while--you should wait 5-10 minutes before worrying that it might not finish.

Then select all the text in the Terminal (Edit > Select All), copy it to the clipboard (Edit > Copy), and paste it here.

Revision history for this message
bhaskar (hinduvsp) said :
#2

HI Eliah kagan,

I followed the same procedure as you mentioned above and produce the result below this message and you can see the error while trying to install MATLAB in my computer. I want to install MATLAB at any cost in my ubuntu system because i want to completely migrate from windows to this linux machine.

bhaskar@bhaskar-Inspiron-1525:~$ apt-cache policy libdbus-1-3 ia32-libs libc6 libc6-\*
libc6:
  Installed: 2.13-0ubuntu13
  Candidate: 2.13-0ubuntu13
  Version table:
 *** 2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
libdbus-1-3:
  Installed: 1.4.6-1ubuntu6
  Candidate: 1.4.6-1ubuntu6
  Version table:
 *** 1.4.6-1ubuntu6 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
libc6.1:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-dev:
  Installed: 2.13-0ubuntu13
  Candidate: 2.13-0ubuntu13
  Version table:
 *** 2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
libc6-dev-amd64:
  Installed: (none)
  Candidate: 2.13-0ubuntu13
  Version table:
     2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
libc6-i386:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-amd64:
  Installed: (none)
  Candidate: 2.13-0ubuntu13
  Version table:
     2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
libc6.1-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-i686:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-dbg:
  Installed: (none)
  Candidate: 2.13-0ubuntu13
  Version table:
     2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
libc6-pic:
  Installed: (none)
  Candidate: 2.13-0ubuntu13
  Version table:
     2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
libc6-prof:
  Installed: (none)
  Candidate: 2.13-0ubuntu13
  Version table:
     2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
libc6-xen:
  Installed: (none)
  Candidate: 2.13-0ubuntu13
  Version table:
     2.13-0ubuntu13 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
libc6.1-pic:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-dev-armel-cross:
  Installed: (none)
  Candidate: 2.13-0ubuntu13cross1.62
  Version table:
     2.13-0ubuntu13cross1.62 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
libc6-armel-cross:
  Installed: (none)
  Candidate: 2.13-0ubuntu13cross1.62
  Version table:
     2.13-0ubuntu13cross1.62 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
libc6-armel-dcv1:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-dbg-armel-cross:
  Installed: (none)
  Candidate: 2.13-0ubuntu13cross1.62
  Version table:
     2.13-0ubuntu13cross1.62 0
        500 http://in.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ natty/universe i386 Packages
libc6-dbg-armel-dcv1:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6-dev-armel-dcv1:
  Installed: (none)
  Candidate: (none)
  Version table:
libc6.1-dev-armel-cross:
  Installed: (none)
  Candidate: (none)
  Version table:
N: Unable to locate package ia32-libs
bhaskar@bhaskar-Inspiron-1525:~$ locate libdbus-1.so.3 libc.so.6
/lib/i386-linux-gnu/libc.so.6
/lib/i386-linux-gnu/libdbus-1.so.3
/lib/i386-linux-gnu/libdbus-1.so.3.5.4
bhaskar@bhaskar-Inspiron-1525:~$ sudo updatedb
[sudo] password for bhaskar:
bhaskar@bhaskar-Inspiron-1525:~$ locate libdbus-1.so.3 libc.so.6
/lib/i386-linux-gnu/libc.so.6
/lib/i386-linux-gnu/libdbus-1.so.3
/lib/i386-linux-gnu/libdbus-1.so.3.5.4

The error which come from installing matlab is shown below and followed this installation process from ubuntu forums thread
http://ubuntuforums.org/showthread.php?t=676523&highlight=installing+matlab&page=2

bhaskar@bhaskar-Inspiron-1525:~/Desktop$ ls
10.1.1.79.6578.pdf
320999e.pdf
Chandu
configuration.pdf
glibc-2.9
Hindi Songs Vol - II
Iana_port_numbers.pdf
iana_protocol_numbers.pdf
jre-6u25-linux-i586.bin
Led Zeppelin - Stairway to Heaven (Live Earls Court 1975).mp4
Matlab_R2009a.iso
matlabToScilab.pdf
MatlabToScilab.pdf
Matlab.UNIX.R2010a
Matlab.UNIX.R2010a.iso
matlab.unix.tar.bz2
maybeck_ch1.pdf
new file
opera_11.10.2092_i386.deb
Prema Desham Yuvarani.flv
Samba24Hc13.pdf
samba-docs-v3-4-test-22de0639
samba-how-do-you-install-and-set-up-samba-in-debian-squeezeubuntu.pdf
srv
Telugu Audio Songs Vol - I
Ubuntu_commands_histort_10052011.txt
ubuntu_Natty_Narwal.pdf
unity_shortcuts.pdf
Veera (2011)
bhaskar@bhaskar-Inspiron-1525:~/Desktop$ sudo mkdir /media/iso
mkdir: cannot create directory `/media/iso': File exists
bhaskar@bhaskar-Inspiron-1525:~/Desktop$ sudo modprobe loop
bhaskar@bhaskar-Inspiron-1525:~/Desktop$ sudo mount -t iso9660 Matlab.UNIX.R2010a.iso /media/iso
mount: /home/bhaskar/Desktop/Matlab.UNIX.R2010a.iso is not a block device (maybe try `-o loop'?)
bhaskar@bhaskar-Inspiron-1525:~/Desktop$ sudo mount -t iso9660 -o loop Matlab.UNIX.R2010a.iso /media/iso
bhaskar@bhaskar-Inspiron-1525:~/Desktop$ cd /usr/local
bhaskar@bhaskar-Inspiron-1525:/usr/local$ sudo mkd
mkdir mkdiskimage mkdosfs
bhaskar@bhaskar-Inspiron-1525:/usr/local$ sudo mkdir matlab2010a
mkdir: cannot create directory `matlab2010a': File exists
bhaskar@bhaskar-Inspiron-1525:/usr/local$ sudo mkdir matlab2010b
bhaskar@bhaskar-Inspiron-1525:/usr/local$ cd ma
man/ matlab2009a/ matlab2010a/ matlab2010b/
bhaskar@bhaskar-Inspiron-1525:/usr/local$ cd matlab2010
bhaskar@bhaskar-Inspiron-1525:/usr/local/matlab2010b$ sudo /media/iso/install
/media/iso/install: 1156: /lib/libc.so.6: not found
-------------------------------------------------------------------

    The following messages were written to standard error
    while running 'xsetup' the X Window System version
    of 'install'.

        xsetup: Unable to load required font.

-------------------------------------------------------------------
bhaskar@bhaskar-Inspiron-1525:/usr/local/matlab2010b$

Anyway thanks for your quick reply and give me a solution to this problem as early as possible.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

This post does not address the fundamental problem preventing MATLAB from installing. Instead, it focuses on the way you're installing it. You can ignore this post if you really want to, but I recommend you read it, as it might help you to avoid other problems later. I'll post again shortly to work on a solution to your problem.

The instructions at http://ubuntuforums.org/showthread.php?t=676523&highlight=installing+matlab&page=2 are for a much older version of MATLAB than the one you're attempting to install. You would be better off consulting the official documentation (written documentation, documentation on the CD or in the .iso image, or documentation on the MATLAB website).

I have also noticed that you are doing a couple of things that seem like they made lead to problems later. Your user account (without sudoing to root) seems to have write access to /usr/local. It's fine for trusted users to have write access to /usr/local/src, as not having to sudo to root to work inside /usr/local/src decreases the chance of bad mistakes. But having access to write inside /usr/local itself is probably a bad thing. And /usr/local is a bad place in which to do your work.

If you were thinking of installing MATLAB into somewhere with a name like /usr/local/matlab..., well, you could, and I'd go ahead and do that if that's what the installer wants to do, but the installer is more likely to want to install somewhere inside /opt, which is a more standard place to put a program installed from an automated binary-only installer (like MATLAB).

Also, if you're installing MATLAB 2010a, you should really not be creating or using a folder called MATLAB 2010b. That may lead to enormous confusion later if some day you *do* actually install MATLAB 2010b and forget even in the smallest detail about what you did this time around.

If they are empty, I recommend you remove the /usr/local/matlab2010a and /usr/local/matlab2010b directories. If there is documentation for installing MATLAB, I recommend you work for that. Otherwise, the best way to install it would probably be:

cd /media/iso
sudo ./install

(You can really run the installer from anywhere, though. But I don't recommend you start out with the destination directory for the MATLAB installation already created. The installer can create the directory where it wants it--generally speaking, it's a good idea to let it install where it likes.)

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

When MATLAB tried to install, for some reason it looked for libc.so.6 in /lib. That might just be a bug in the installer--it might not actually check where libc.so.6 is located. If that's the case, we can work around the problem easily. But the new error message "/sbin/init: error while loading shared libraries: libdbus-1.so.3: cannot open shared object or file: No such file or directory" during boot is cause for concern. It merits investigation.

If you need to get MATLAB installed and running right away, a simple workaround that will likely enable the installation to proceed is to create a symbolic link for libc.so.6 in /lib. You can do that by running this command:

sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6

I highly recommend you copy and paste (rather than retyping) that command, so as to minimize the chance of typos.

After you create that, you can run the installer again and see what happens.

On the other hand, if you have the time to investigate this new boot-time error message, I'd recommend doing that first--it's possible that the MATLAB installer is causing it. It's also possible that it's entirely innocuous (or that the only breakage it indicates is in MATLAB itself). It's also possible that it indicates a greater problem.

To investigate that, press Alt+F2 and run:

gedit /var/log/syslog

Select all the text (Ctrl+A) and copy it to the clipboard (Ctrl+C).

If this file is less than 300 lines (you can to go to the very end and see the line number for the last line), please go ahead and paste it here. If it's more than 300 lines, please instead paste it at http://paste.ubuntu.com and post a link to it here. That file may contain a log of the events relating to the "/sbin/init: error while loading shared libraries: libdbus-1.so.3: cannot open shared object or file: No such file or directory" error message.

Revision history for this message
bhaskar (hinduvsp) said :
#5

Hi Eliah kagan,
I forget to say that the original error "/sbin/init: error while loading shared libraries: libdbus-1.so.3: cannot open shared object or file: No such file or directory" has been solved by using ubuntu live cd. Now i don't get this error and system works fine.

Now my problem is with installation of MATLAB and i followed your suggestions in this post but still i was unable to rectify the problem in it. It was installing in first attempt and works fine, when i quit from this matlab and there was no installation candidate of matlab in ubuntu system.

Below is the error producing my terminal:
 bhaskar@bhaskar-Inspiron-1525:/media/iso$ sudo modprobe loop
 bhaskar@bhaskar-Inspiron-1525:/media/iso$ sudo mount -t iso9660 -o loop /home/bhaskar/Desktop/Matlab.UNIX.R2010a.iso /media/iso

bhaskar@bhaskar-Inspiron-1525:/media/iso$ sudo ./install
-------------------------------------------------------------------

    The following messages were written to standard error
    while running 'xsetup' the X Window System version
    of 'install'.

        xsetup: Unable to load required font.

-------------------------------------------------------------------
bhaskar@bhaskar-Inspiron-1525:/media/iso$

I came with another problem of running vsftpd (FTP) server in ubnut system. Previously it was worked fine( that mean there are no problems in starting/stopping/restarting vsftpd). Now i installed again this vsftpd after recoverd ubuntu from live cd , i am getting the following error in terminal:
bhaskar@bhaskar-Inspiron-1525:~$ sudo service vsftpd start
[sudo] password for bhaskar:

Warning: Fake initctl called, doing nothing.
bhaskar@bhaskar-Inspiron-1525:~$

I have been posted my log file in http://paste.ubuntu.com and below is the log file link in paste ubuntu website.
http://paste.ubuntu.com/607332/

Can you suggest some good websites to learn better about ubuntu and it's networking.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#6

"I forget to say that the original error .... has been solved by using ubuntu live cd."

Can you elaborate further about how you solved this problem? If the problem was triggered by MATLAB, then by understanding how you solved it, I might be better able to help you install MATLAB successfully.

In addition, know what you did when working from the live CD should help in figuring out what changed to keep vsftpd from working. Normally I would ask you to post a separate question about your problem with vsftpd, but it looks like it may be related to the MATLAB problem insofar as whatever you did to fix the libdbus-1.so.3 error may have caused the vsftpd problem.

Revision history for this message
bhaskar (hinduvsp) said :
#7

I solved the problem by inserting the ubuntu live cd and then i got a option in installing as "upgrade from ubutu 11.04 to ubuntu 11.04" and proceeded from this option, in this process the file system has been recovered from the ubuntu live cd at the same time all of my third party applications are disappeared (removed) from my ubuntu system.
The reason for these third party applications are disappeared because i was removed the ubuntu live cd in the middle of recovering process. And why i am removed this live cd is because of the recovering process may not proceeding after some time.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

> I solved the problem by inserting the ubuntu live cd and then i got
> a option in installing as "upgrade from ubutu 11.04 to ubuntu 11.04

It was already version 11.04 before you selected to upgrade (to the same version)?

> The reason for these third party applications are disappeared
> because i was removed the ubuntu live cd in the middle of
> recovering process.

Which third party applications? Are you talking about applications installed from PPA's, or are you talking about applications like MATLAB?

It's standard for applications installed from PPA's to sometimes be removed when upgrading to a new release of Ubuntu. This would not necessarily be a result of your having interrupted the upgrade process.

> And why i am removed this live cd is because of the recovering
> process may not proceeding after some time.

For how long was it stalled, and what was it doing when it was stalled (for example, what step of the upgrade did it say it was performing)?

Revision history for this message
bhaskar (hinduvsp) said :
#9

1. My ubuntu has already version of ubuntu 11.04 for recovery purposes i was chosen this option.

2. Yes the applications installed from PPA's like vlc, google chrome, skype etc........

3. It was stalled for almost half-hour and at the stall it was recovering third party applications( it's approximately) but recovering file system was already over before this stall time.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

Try installing MATLAB with:

sudo ./install -t

If that doesn't work, please post another reply.

Revision history for this message
bhaskar (hinduvsp) said :
#11

It's my great pleasure to get help from you and i am totally welcomed to your way of supporting others.

Thanks.
Bhaskar

Revision history for this message
bhaskar (hinduvsp) said :
#12

Note: This is a process to add matlab PATH variable to existing system PATH variable by following commands.
PATH=$PATH:/usr/local/matlab2010a/bin/
export PATH
Now the matlab path variable is coming to system variable PATH and now the shell will looks this matlab path variable.
This is recently found from my recent Matlab installation.

The problem now pending is to attach matlab icon to desktop.

Revision history for this message
bhaskar (hinduvsp) said :
#13

The following link will tell how to remove a PATH variable from the existing system PATH variable by executing the following
http://www.linuxjournal.com/content/remove-path-your-path-variable-0

Remove a path from your PATH variable

  HOW-TOs
If you need to remove a path from the PATH variable before your script runs add this to the beginning of the script:
  PATH=$(echo $PATH | sed -e 's;:\?/home/user/bin;;' -e 's;/home/user/bin:\?;;')
If you need, you can re-add it at the front of the list with:
  PATH=/home/user/bin:$PATH
Or you can re-add it at the end of the list with:
 PATH=$PATH:/home/user/bin

Revision history for this message
bhaskar (hinduvsp) said :
#14
Revision history for this message
bhaskar (hinduvsp) said :
#15

launcher can be installed using the ubuntu help website. And launcher can be found in the dash by providing the complete path address in /usr/share/applications/matlab.desktop file. where (exec = matlab -arch=glnx86 -desktop) can be edited with below.
exec = /usr/local/MATLAB/R2012a/bin/matlab -arch=glnx86 -desktop and the path may vary based on your installation.