今天發現有台服務器沒裝rar,提示:rar: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory 還是hao32給搞定的,問了下方法,原來是因為沒裝gcc-c++,下面說下過程
首先下載rarlinux-3.8.0.tar.gz
wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
2然後解壓 # tar xvfz rarlinux-3.8.0.tar.gz 3安裝 # make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
4解壓文件:
# rar x test.rar /
rar: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by rar)
5需要GLIBC_2.4。如果沒有GLIBC_2.4可以
# cp ./rar/rar_static /usr/local/bin/rar
rar_static 版是 static linking 版本,不會有 glibc 程式庫版本不和的問題。
再次解壓:
[root@xxxx ~]# rar x test.rar /
RAR 3.71 Copyright (c) 1993-2007 Alexander Roshal 20 Sep 2007
Shareware version Type RAR -? for help Extracting from test.rar Extracting /test.txt OK
All OK 6打包 rar a install.rar ./install.log
可以了