繁体   English   中英

centOS 7-安装Python 3的困难

[英]centOS 7 - difficulties with installing Python 3

我有一个全新的centOS 7 VM,正在尝试安装Python 3(当前为3.6.0)。 我正在遵循Daniel Eriksson的指南( https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/

但是在运行make && make altinstall命令时Pemission denied错误。

我得到的错误的最后一部分在这里:

gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers   -I. -I./Include   -fPIC -DPy_BUILD_CORE -o Programs/_testembed.o ./Programs/_testembed.c
gcc -pthread -Wl,-rpath /usr/local/lib  -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o -L. -lpython3.6m -lpthread -ldl  -lutil   -lm  
# Substitution happens here, as the completely-expanded BINDIR
# is not available in configure
sed -e "s,@EXENAME@,/usr/local/bin/python3.6m," < ./Misc/python-config.in >python-config.py
# Replace makefile compat. variable references with shell script compat. ones;  -> 
LC_ALL=C sed -e 's,\$(\([A-Za-z0-9_]*\)),\$\{\1\},g' < Misc/python-config.sh >python-config
# On Darwin, always use the python version of the script, the shell
# version doesn't use the compiler customizations that are provided
# in python (_osx_support.py).
if test `uname -s` = Darwin; then \
    cp python-config.py python-config; \
fi
if test "no-framework" = "no-framework" ; then \
    /bin/install -c python /usr/local/bin/python3.6m; \
else \
    /bin/install -c -s Mac/pythonw /usr/local/bin/python3.6m; \
fi
/bin/install: cannot create regular file ‘/usr/local/bin/python3.6m’: Permission denied
make: *** [altbininstall] Error 1

我通常不使用Linux,因此我不确定要在哪里寻找或下一步尝试。 任何帮助对此表示赞赏。 谢谢

问题与运行命令以安装软件包时所需的权限有关。

采用
sudo make && sudo make altinstall

代替:
sudo make && make altinstall

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM