今天发现有台服务器没装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 xvfzrarlinux-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
网友评论