场景说明Linux服务器,没有root权限 需要使用zip/unzip,但遗憾的是服务器没有安装 https://blog.csdn.net/github_28260175/article/details/99420182
解决办法自己用源码编译 步骤下载zip/unzip的源码包 -> 工具主页 Info-ZIP 实际上主页的下载地址过期了 -> 真下载主页 sourceforge tar解压 到解压好的文件夹里,把./unix/Makefile 拷到根目录. 下,用make generic 安装即可。
过程下载unzip60.tar.gz
wget http://downloads./infozip/unzip60.tar.gz 或者 wget https://nchc.dl./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 下载文件后解压可得到 unzip60.tar.gz 和 zip30.tar.gz 两个文件。 编译zip30.tar.gz: tar -zxvf zip30.tar.gz cd zip30 make -f unix/Makefile generic 编译完成后当前目录存在zip可运行文件,
若要自定义交叉编译工具,比如在嵌入式系统运行,则只要修改 unix\Makefile文件下的: #CC = cc 这句屏蔽 并修改对应的路径 CC = /home/mipsel-unknown-linux-gnu/bin/mipsel-unknown-linux-gnu-gcc 然后重新clean 后再编译即可: make -f unix/Makefile clean make -f unix/Makefile generic
|