首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >centOS 7-安装Python3的困难

centOS 7-安装Python3的困难
EN

Stack Overflow用户
提问于 2017-04-05 17:32:38
回答 1查看 1.3K关注 0票数 0

我有一个全新的centOS 7 VM,正在尝试在其上安装Python3(目前为3.6.0)。我正在跟随丹尼尔·埃里克森(https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/)的指导。

但是在运行Pemission denied命令时,我遇到了一个make && make altinstall错误。

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

代码语言:javascript
复制
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,所以我不确定应该在哪里查找,也不知道下一步该尝试什么。对此的任何帮助都很感激。谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-04-05 17:43:54

问题在于运行安装包所需的命令时所需的权限。

使用

sudo make && sudo make altinstall

而不是:

sudo make && make altinstall

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43237949

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档