安装rar程序
rar下载地址
Centos7 安装rar
安装rar
解压命令:
tar -vxzf rarlinux-x64-621.tar.gz -C /usr/local/
cd /usr/local/rar
[root@localhost 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已安装成功
RAR 4.20 Copyright (c) 1993-2012 Alexander Roshal 9 Jun 2012
Trial version Type RAR -? for help
Usage: rar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>
<Commands>
a Add files to archive
c Add archive comment
cf Add files comment
ch Change archive parameters
cw Write archive comment to file
d Delete files from archive
e Extract files to current directory
f Freshen files in archive
i[par]=<str> Find string in archives
k Lock archive
l[t,b] List archive [technical, bare]
m[f] Move to archive [files only]
p Print file to stdout
r Repair archive
rc Reconstruct missing volumes
rn Rename archived files
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[name|-] Convert archive to or from SFX
t Test archive files
u Update files in archive
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path
<Switches>
- Stop switches scanning
@[+] Disable [enable] file lists
ad Append archive name to destination path
ag[format] Generate archive name using the current date
ai Ignore file attributes
...
如果出现以下报错,请继续下面操作
rar: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by rar)
1.查看动态库中有哪些版本的glibc(发现缺少3.4.21的这个版本)
strings /usr/lib64/libstdc++.so.6 | grep GLIBC
2.解决办法
下载之后利用远程工具上传到服务器上,利用unzip命令解压,然后
#解压命令
unzip libstdc.so_.6.0.26.zip
# 删除源文件和连接文件
rm -rf /lib64/libstdc++.so.6.0.19
rm -rf /lib64/libstdc++.so.6
# 新增源文件和连接文件
cp libstdc++.so.6.0.26 /lib64/
ln -s /lib64/libstdc++.so.6.0.26 /lib64/libstdc++.so.6
windows 安装rar
默认安装,步骤略。。。
设置虚拟环境 系统属性=>高级=>环境变量 双击打开path
填写WinRAR.exe所在路径
python 安装rarfile包 需要 重启pycharm才生效