闲话不说,centos上如何安装rar、unrar在线解压缩软件呢?
wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz
tar -zxvf rarlinux-3.9.3.tar.gz cd rar make
看见下面这些信息就是安装成功了:
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
常用rar命令:
rar x centos.rar //解压 centos.rar 到当前目录
rar centos.rar ./piaoyi.org/ //将 piaoyi.org 目录打包为 centos.rar
但是飘易推荐大家使用zip压缩和解压,因为zip一般是linux系统自带:
zip -r myfile.zip ./web
unzip -o -d /home/sunny myfile.zip
rar: /lib/i686/nosegneg/libc.so.6: version `GLIBC_2.7' not found (required by rar)
cp rar_static /usr/local/bin/rar
2、使用rar的时候出现错误
bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
yum install glibc.i686
3、重新安装glibc.i686以后还有如下类似错误
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
yum install libstdc++.so.6
for 64 bit
#wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.x86_64.rpm
#rpm -Uvh unrar-4.0.7-1.el6.rf.x86_64.rpm
install rar centos x64
#wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.x86_64.rpm
#rpm -Uvh rar-3.8.0-1.el6.rf.x86_64.rpm
#wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.i686.rpm
#rpm -Uvh unrar-4.0.7-1.el6.rf.i686.rpm
#wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.i686.rpm
#rpm -Uvh rar-3.8.0-1.el6.rf.i686.rpm
本文完。 |