wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tar.xz tar -xvJf Python-3.8.3.tar.xz cd Python-3.8.3 # 编译安装 TODO --enable-shared 待验证是否需要(暂不使用) # --enable-optimizations参数,这样才能启用很多功能。 ./configure prefix=/usr/local/python383 make && make install # 添加软链接 ln -s /usr/local/python383/bin/python3.8 /usr/bin/python383
make 失败后 使用 make clean 清除,重新编译 make
问题记录
libpython3.8.so.1.0: cannot open shared object file
采用 --enable-shared编译后的问题
1 2 3
[fdm@neo4j ~]$ virtualenv env383 -p /usr/bin/python383 Running virtualenv with interpreter /usr/bin/python383 /usr/bin/python383: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory