美文网首页
一站式解决服务器缺少编译环境的问题,别再为了缺少依赖而烦恼了!

一站式解决服务器缺少编译环境的问题,别再为了缺少依赖而烦恼了!

作者: cuteximi_1995 | 来源:发表于2018-10-11 11:42 被阅读0次

    本文参考:https://github.com/pyenv/pyenv/wiki/Common-build-problems

    Ubuntu / Debian 系统:

    sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
    libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
    xz-utils tk-dev libffi-dev liblzma-dev
    

    Fedro / Centos /RHEL 系统:

    sudo yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \
    openssl-devel xz xz-devel libffi-devel
    

    openSUSE :

    zypper in zlib-devel bzip2 libbz2-devel readline-devel sqlite3 sqlite3-devel libopenssl-devel xz xz-devel
    

    macOS:

    brew install readline xz
    

    如果你的 macOS 是Mojave or higher (10.14+)

    sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
    

    NOTE: libssl-dev is required when compiling Python, installing libssl-dev will actually install zlib1g-dev, which leads to uninstall and re-install Python versions (installed before installing libssl-dev). On Redhat and derivatives the package is named openssl-devel.

    相关文章

      网友评论

          本文标题:一站式解决服务器缺少编译环境的问题,别再为了缺少依赖而烦恼了!

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