今天發(fā)現(xiàn)有臺(tái)服務(wù)器沒裝rar,提示:rar: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
還是hao32給搞定的太颤,問了下方法营搅,原來是因?yàn)闆]裝gcc-c++晕换,下面說下過程
首先下載rarlinux-3.8.0.tar.gz
wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
2然后解壓
# tar xvfzrarlinux-3.8.0.tar.gz
3安裝
#makeinstall
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 版本凳枝,不會(huì)有 glibc 程式庫(kù)版本不和的問題。
再次解壓:
[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
可以了