0

I tried to run some software to monitor the old adaptec array controller, and got this:

error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

So I tried to search but it's not listed:

   $ sudo apt-cache search libstd*
    libstonith1 - Reusable cluster libraries -- libstonith1
    libstdc++6-4.6-dev - GNU Standard C++ Library v3 (development files)
    libstdc++6 - GNU Standard C++ Library v3
    perl - Larry Wall's Practical Extraction and Report Language
    libruby1.8 - Libraries necessary to run Ruby 1.8
    libstartup-notification0 - library for program launch feedback (shared library)

apt-get update fails because the online repos don't work anymore with this old version, even if I tried the sed tricks recommended elsewhere,

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Next I downloaded the DVD ISO from here and added it to a clean /etc/apt/sources.list but still not joy.

Here is the current sources.list file:

# CD
deb file:/media/ubuntu-12.04.5-iso/ precise main  restricted

# DVD
#deb file:/media/ubuntu-12.04.5-dvd-iso/ precise main  restricted

$ sudo apt-get update
Get:1 file: precise Release.gpg [198 B]
Get:2 file: precise Release [4,595 B]
Ign file: precise/main TranslationIndex
Ign file: precise/restricted TranslationIndex
Ign file: precise/main Translation-en_AU
Ign file: precise/main Translation-en
Ign file: precise/restricted Translation-en_AU
Ign file: precise/restricted Translation-en
Reading package lists... Done

I tried both the DVD and CD ISOs.

Then I tried to download and install a .deb file from http://old-releases.ubuntu.com/ubuntu/pool/main/g/gcc-3.3/libstdc++5_3.3.6-15ubuntu2_amd64.deb

$ sudo gdebi libstdc++5_3.3.6-15ubuntu2_amd64.deb 
[sudo] password for zanotech: 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Building data structures... Done 
Building data structures... Done 
This package is not able to be installed
Dependency is not satisfiable: gcc-3.3-base (>= 1:3.3.6-15ubuntu2)

Sure enough this server is running gcc-4.6-base.

For comparison, on a Centos 7 server I got around the issue with:

# yum -y install compat-libstdc++-33

Where am I going wrong?

Is there a way to install the old libstdc++ just into the directory where I run the utility from?

2
  • 1
    why do you use such an ancient Ubuntu?
    – phuclv
    Jun 25, 2021 at 1:43
  • The server has some ancient inhouse developed php/mySQL app that may not be upgraded for another year. So for now I just wish to maintain it as best as I can.
    – Red-Roo
    Jun 25, 2021 at 1:52

1 Answer 1

1

This is highly speculative and definitely-not-recommended but if the shared object file is truly, honestly all you want, why not copy it "by hand" from an old, outdated version of Ubuntu (if necessary one you just created in, say, a virtual box)?

6
  • As shown in the OP, I did try to obtain an old version, but gdebi wouldn't install it because of a gcc version conflict.
    – Red-Roo
    Jun 25, 2021 at 3:23
  • @Red-Roo I think Sven's point is that you don't install the package, but just extract the .so file from it and use it instead.
    – muru
    Jun 25, 2021 at 4:53
  • @muru Ahhh I see. I've done that with dpkg-deb -R libstdc++5_3.3.6-15ubuntu2_amd64.deb . But where do I put the libstdc++.so.5 file? In the same folder as the currently installed /usr/lib/x86_64-linux-gnu/libstdc++.so.6 or should it live in the root folder of the software that needs it?
    – Red-Roo
    Jun 25, 2021 at 5:17
  • I copied the old library file like this and it works! :-D $ sudo cp libstdc++.so.5 /usr/lib/x86_64-linux-gnu/
    – Red-Roo
    Jun 25, 2021 at 5:47
  • As a closing query - if no other software calls that old lib that I just copied into /usr/lib/x86_64-linux-gnu/ there shouldn't be any issues right?
    – Red-Roo
    Jun 25, 2021 at 5:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .