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

本文介绍在Linux服务器上,当没有root权限时,如何通过源码编译的方式自行安装zip和unzip工具。文章详细描述了从下载源码包、解压、修改Makefile到最终安装验证的全过程。
548

被折叠的 条评论
为什么被折叠?



