ほとまるブログ

おっぱいアニメ愛好家のブログ (゚∀゚)o彡゜おっぱい!おっぱい!

ubuntu9.10(amd64)で、libstdc++.so.5(i386)を使いたい

RealProducer(32bit)を使おうとしたら

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

libstdc++.so.5が足りないらしい。ia32-libs はインストールされているが、 libstd++5 はないようだ・・・
ここで lib32stdc++5 を探してみる。 http://packages.ubuntu.com/

lib32stdc++5 を名前に含むパッケージを、すべてのスイート、すべてのセクション、すべてのアーキテクチャで検索しました。
残念ながら、検索結果はありませんでした

仕方がないので、ぐぐる。何かあったw
https://launchpad.net/ubuntu/warty/amd64/lib32stdc++5/1:3.3.4-9ubuntu5.1
http://launchpadlibrarian.net/1659047/lib32stdc%2B%2B5_3.3.4-9ubuntu5.1_amd64.deb
wartyって、いつだよwww インストールしようとするが、gcc-3.3-base も必要らしい
http://packages.ubuntu.com/ で探すと hardy の頃はあったようだ
http://packages.ubuntu.com/hardy/gcc-3.3-base
それぞれインストールして、もう一度実行

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

ん? 変わらない。パッケージが古すぎて、変なところにインストールされたようだw シンボリックを張り直す

# ln -s /emul/ia32-linux/usr/lib/libstdc++.so.5.0.7 /usr/lib32/libstdc++.so.5

今度は動いた。debian-squeeze が不調なので、ubuntuに戻ってきたが、パッケージ切り捨てるの早すぎw
どっちもどっちだなあ・・・・
 
どうも手順が変な気がして、もう少し調べたら、libstdc++.so.5 だけインストールするのが正しいらしい
参考: http://agentzlerich.blogspot.com/2009/11/getting-32-bit-libstdcso5-in-karmic.html
切れるかもしれないので、一応コピペしておく

Getting 32-bit libstdc++.so.5 in Karmic Koala on a 64-bit system
 
The Intel compilers require a 32-bit version of libstdc++.so.5 to function. Getting a copy of that build of that library requires a couple of steps in the latest 64-bit Ubuntu 9.10. These have been alluded to in other places. Just in case someone needs the details, here they are:

   1. Download the i386 libstdc++ package for Jaunty: http://packages.ubuntu.com/jaunty/i386/libstdc++5/download
   2. Unpack the .deb archive using ar vx ~/Desktop/libstdc++5_3.3.6-17ubuntu1_i386.deb
   3. Unpack the resulting data.tar.gz using tar xzvf data.tar.gz
   4. Confirm that you got the 32-bit version using file usr/lib/libstdc++.so.5.0.7
   5. Install the library into /usr/lib32 using sudo install usr/lib/libstdc++.so.5.0.7 /usr/lib32
   6. Change to /usr/lib32 using cd /usr/lib32
   7. Create a symlink to finish the task via sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5

なるほどね。そりゃそうだw
古いパッケージが入っていると、あとで痛い目を見るのでやり直す
とりあえず、さっきのパッケージをアンインストールする。
http://packages.ubuntu.com/jaunty/i386/libstdc++5/download から適当にダウンロードする

$ ar vx libstdc++5_3.3.6-17ubuntu1_i386.deb
$ tar xzvf data.tar.gz

展開されるので、

$ sudo install usr/lib/libstdc++.so.5.0.7 /usr/lib32
$ sudo ln -s /usr/lib32/libstdc++.so.5.0.7 /usr/lib32/libstdc++.so.5

うまくいったw