下载安装包
Linux版本的7zip为p7zip,下载地址如下:
https://sourceforge.net/projects/p7zip/files/latest/download
下载之后上传对应的Linux目录
安装依赖
安装gcc
yum install gcc
安装gcc-c++
yum install gcc-c++
解压安装包
跳转到对应的安装包存放目录
tar -xjvf p7zip_16.02_src_all.tar.bz2
如果解压报错:
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
这里其实就是少了解压bzip2的程序,yum安装一下就可以了
yum -y install bzip2
安装7zip
1、cd p7zip_16.02
2、make
3、make install
出现如下提示说明安装成功:
./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip
- installing /usr/local/bin/7za
- installing /usr/local/man/man1/7z.1
- installing /usr/local/man/man1/7za.1
- installing /usr/local/man/man1/7zr.1
- installing /usr/local/share/doc/p7zip/README
- installing /usr/local/share/doc/p7zip/ChangeLog
- installing HTML help in /usr/local/share/doc/p7zip/DOC