linux 源码安装 zip/unzip
场景说明
- Linux服务器,没有root权限
- 需要使用zip/unzip,但遗憾的是服务器没有安装
解决办法
自己用源码编译
步骤
- 下载zip/unzip的源码包 -> 工具主页 Info-ZIP
实际上主页的下载地址过期了 -> 真下载主页 sourceforge - tar解压
- 到解压好的文件夹里,把
./unix/Makefile
拷到根目录.
下,用make generic
安装即可。
过程
下载unzip60.tar.gz
1
wget http://downloads.sourceforge.net/infozip/unzip60.tar.gz
或者
1
wget https://nchc.dl.sourceforge.net/project/infozip/UnZip 6.x %28latest%29/UnZip 6.0/unzip60.tar.gz
解压
1
tar xzvf unzip60.tar.gz
安装
1
2
3cp ./unix/Makefile .
make clean
make generic验证是否安装成功
1
2zip
unzip