Link to home
Create AccountLog in
Avatar of smetterd
smetterdFlag for United States of America

asked on

VNC Server setup error - Ubuntu Hardy -error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file

dallasray@justis:~$ vnc4server

You will require a password to access your desktops.

vncpasswd: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
dallasray@justis:~$
Avatar of MushyPea
MushyPea

How did you install vnc4server?  If you just downloaded the binary from somewhere, remove it, and do:

aptitude install vnc4server

This will then install any dependencies, including the shared libraries needed.


(just to check:
$ apt-cache depends vnc4server | grep libstdc
  Depends: libstdc++6
)
Oh, and if you did install the package, try this:

apt-get update
apt-get -f install

That should fix any missing dependencies.
Avatar of smetterd

ASKER

dallasray@justis:~$ sudo apt-get update
Hit http://archive.canonical.com hardy Release.gpg
Ign http://archive.canonical.com hardy/partner Translation-en_US    
Hit http://us.archive.ubuntu.com hardy Release.gpg                  
Ign http://us.archive.ubuntu.com hardy/main Translation-en_US        
Hit http://packages.medibuntu.org hardy Release.gpg                                        
Ign http://packages.medibuntu.org hardy/free Translation-en_US                            
Ign http://packages.medibuntu.org hardy/non-free Translation-en_US                        
Hit http://security.ubuntu.com hardy-security Release.gpg                                  
Ign http://security.ubuntu.com hardy-security/main Translation-en_US                      
Ign http://security.ubuntu.com hardy-security/restricted Translation-en_US                
Hit http://archive.canonical.com hardy Release                                            
Ign http://us.archive.ubuntu.com hardy/restricted Translation-en_US                      
Ign http://us.archive.ubuntu.com hardy/universe Translation-en_US    
Ign http://us.archive.ubuntu.com hardy/multiverse Translation-en_US  
Hit http://us.archive.ubuntu.com hardy-updates Release.gpg                                
Ign http://us.archive.ubuntu.com hardy-updates/main Translation-en_US                      
Ign http://us.archive.ubuntu.com hardy-updates/restricted Translation-en_US                
Ign http://us.archive.ubuntu.com hardy-updates/universe Translation-en_US                  
Hit http://packages.medibuntu.org hardy Release                                            
Ign http://security.ubuntu.com hardy-security/universe Translation-en_US
Ign http://security.ubuntu.com hardy-security/multiverse Translation-en_US
Hit http://security.ubuntu.com hardy-security Release                
Hit http://archive.canonical.com hardy/partner Packages              
Ign http://us.archive.ubuntu.com hardy-updates/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com hardy-backports Release.gpg
Ign http://us.archive.ubuntu.com hardy-backports/main Translation-en_US
Ign http://us.archive.ubuntu.com hardy-backports/restricted Translation-en_US              
Hit http://packages.medibuntu.org hardy/free Packages                                      
Ign http://us.archive.ubuntu.com hardy-backports/universe Translation-en_US                
Hit http://security.ubuntu.com hardy-security/main Packages                                
Ign http://us.archive.ubuntu.com hardy-backports/multiverse Translation-en_US              
Hit http://archive.canonical.com hardy/partner Sources                                    
Hit http://us.archive.ubuntu.com hardy Release                                            
Hit http://us.archive.ubuntu.com hardy-updates Release              
Hit http://packages.medibuntu.org hardy/non-free Packages                                
Hit http://us.archive.ubuntu.com hardy-backports Release            
Hit http://security.ubuntu.com hardy-security/restricted Packages  
Hit http://security.ubuntu.com hardy-security/main Sources
Hit http://security.ubuntu.com hardy-security/restricted Sources
Hit http://us.archive.ubuntu.com hardy/main Packages
Hit http://us.archive.ubuntu.com hardy/restricted Packages
Hit http://us.archive.ubuntu.com hardy/main Sources
Hit http://us.archive.ubuntu.com hardy/restricted Sources
Hit http://security.ubuntu.com hardy-security/universe Packages
Hit http://security.ubuntu.com hardy-security/universe Sources
Hit http://security.ubuntu.com hardy-security/multiverse Packages
Hit http://security.ubuntu.com hardy-security/multiverse Sources
Hit http://us.archive.ubuntu.com hardy/universe Packages
Hit http://us.archive.ubuntu.com hardy/universe Sources
Hit http://us.archive.ubuntu.com hardy/multiverse Packages
Hit http://us.archive.ubuntu.com hardy/multiverse Sources
Hit http://us.archive.ubuntu.com hardy-updates/main Packages
Hit http://us.archive.ubuntu.com hardy-updates/restricted Packages
Hit http://us.archive.ubuntu.com hardy-updates/main Sources
Hit http://us.archive.ubuntu.com hardy-updates/restricted Sources
Hit http://us.archive.ubuntu.com hardy-updates/universe Packages
Hit http://us.archive.ubuntu.com hardy-updates/universe Sources
Hit http://us.archive.ubuntu.com hardy-updates/multiverse Packages
Hit http://us.archive.ubuntu.com hardy-updates/multiverse Sources
Hit http://us.archive.ubuntu.com hardy-backports/main Packages
Hit http://us.archive.ubuntu.com hardy-backports/restricted Packages
Hit http://us.archive.ubuntu.com hardy-backports/universe Packages
Hit http://us.archive.ubuntu.com hardy-backports/multiverse Packages
Hit http://us.archive.ubuntu.com hardy-backports/main Sources
Hit http://us.archive.ubuntu.com hardy-backports/restricted Sources
Hit http://us.archive.ubuntu.com hardy-backports/universe Sources
Hit http://us.archive.ubuntu.com hardy-backports/multiverse Sources
Reading package lists... Done
dallasray@justis:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dallasray@justis:~$


dallasray@justis:~$ sudo aptitude install vnc4server
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done            
The following NEW packages will be automatically installed:
  vnc4-common
The following NEW packages will be installed:
  vnc4-common vnc4server
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/1107kB of archives. After unpacking 2634kB will be used.
Do you want to continue? [Y/n/?] Y
Writing extended state information... Done
Selecting previously deselected package vnc4-common.
(Reading database ... 286616 files and directories currently installed.)
Unpacking vnc4-common (from .../vnc4-common_4.1.1+xorg1.0.2-0ubuntu7_i386.deb) ...
Selecting previously deselected package vnc4server.
Unpacking vnc4server (from .../vnc4server_4.1.1+xorg1.0.2-0ubuntu7_i386.deb) ...
Setting up vnc4-common (4.1.1+xorg1.0.2-0ubuntu7) ...

Setting up vnc4server (4.1.1+xorg1.0.2-0ubuntu7) ...

Reading package lists... Done            
Building dependency tree      
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done            
dallasray@justis:~$ vnc4server

You will require a password to access your desktops.

vncpasswd: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
dallasray@justis:~$ apt-cache depends vnc4server | grep libstdc
  Depends: libstdc++6
dallasray@justis:~$
Did you remove any stray binaries?  Might still be trying to run the wrong one.

Typing this...

   which vnc4server

... should give...

   /usr/bin/vnc4server

Also, what does this...

   dpkg -l | grep libstdc++6

.. show?  Hopefully, the version is 4.1.1-21 or better...

Still got problems?  Can you supply output of...

   ldd /usr/bin/vnc4server
I don't think any stray binaries were removed, but I cannot be sure. Below is the output of your suggested commands. thanks for continued assistance on this.

dallasray@justis:~$ which vnc4server
/usr/bin/vnc4server
dallasray@justis:~$ dpkg -l | grep libstdc++6
ii  libstdc++6                                 4.2.3-2ubuntu7                                             The GNU Standard C++ Library v3
ii  libstdc++6-4.2-dev                         4.2.3-2ubuntu7                                             The GNU Standard C++ Library v3 (development
dallasray@justis:~$ ldd /usr/bin/vnc4server
      not a dynamic executable
dallasray@justis:~$
Hmm, I'm guessing vnc4server is a script which starts off the relevant process(es).  I notice now that it's calling 'vncpasswd' which is failing to load the libraries.

What do you get from these commands?

   which vncpasswd
   ldd `which vncpasswd`
dallasray@justis:~$ which vncpasswd
/usr/local/bin/vncpasswd
dallasray@justis:~$ ldd `which vncpasswd`
      linux-gate.so.1 =>  (0xb7efa000)
      libstdc++-libc6.2-2.so.3 => not found
      libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ebc000)
      libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d6c000)
      /lib/ld-linux.so.2 (0xb7efb000)
dallasray@justis:~$
ASKER CERTIFIED SOLUTION
Avatar of MushyPea
MushyPea

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Brilliant.