美文网首页
centos升级zlib

centos升级zlib

作者: Devin_Yuan | 来源:发表于2023-03-31 15:19 被阅读0次

    前端在构建服务器上编译打包时遇到错误'ZLIB_1.2.9' not found,原因是前端使用了图片压缩相关的依赖,需要zlib>1.2.9的版本,但是centos里yum最高的版本也就1.2.7。

    我们可以通过编译源码升级zlib

    安装

    下载zlib源码并解压

    wget http://zlib.net/zlib-1.2.13.tar.xz
    tar -xf zlib-1.2.13.tar.xz
    

    进入目录

    cd zlib-1.2.13/
    

    指定库文件的安装目录到lib64

    ./configure --libdir=/lib64/
    

    编译并安装

    make
    make install
    

    前端项目重新编译就好了

    👉文章来源:centos升级zlib - Devin's Blog (yw3.fun)

    相关文章

      网友评论

          本文标题:centos升级zlib

          本文链接:https://www.haomeiwen.com/subject/phuhddtx.html