如何取得 12.04.4 LTS 的 libstdc++.so.5?

如何取得 12.04.4 LTS 的 libstdc++.so.5?

我嘗試運行一些軟體來監視舊的 Adaptec 陣列控制器,並得到以下結果:

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

所以我嘗試搜尋但沒有列出:

   $ 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 更新失敗,因為線上儲存庫不再適用於這個舊版本,即使我嘗試了其他地方推薦的 sed 技巧,

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

接下來我從以下位置下載了 DVD ISO:這裡並將其添加到乾淨的 /etc/apt/sources.list 但仍然不高興。

這是目前的sources.list 檔案:

# 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

我嘗試了 DVD 和 CD ISO。

然後我嘗試從下載並安裝 .deb 文件 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)

果然這台伺服器正在運行 gcc-4.6-base。

為了進行比較,我在 Centos 7 伺服器上解決了這個問題:

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

我哪裡錯了?

有沒有辦法將舊的 libstdc++ 安裝到我執行該實用程式的目錄中?

答案1

這是高度推測性的,絕對不推薦,但如果共享物件檔案確實是您想要的,為什麼不從舊的、過時的 Ubuntu 版本(如果有必要的話,您剛剛創建的版本)「手動」複製它,一個虛擬盒子)?

相關內容