-1
我有一個全新的centOS 7虛擬機,它試圖安裝Python 3(目前是3.6.0)。我正在關注Daniel Eriksson的指導(https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/)centOS 7 - 安裝Python 3的困難
但是我在運行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,@[email protected],/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下工作,所以我不完全知道到哪裏尋找或下一個嘗試的東西。任何對此的幫助表示讚賞。謝謝
你需要'root'或需要有sudoers的權限 – kuro
我使用'須藤使&&使altinstall' - 這是不是你意思? – mmenschig
@mmenschig:使用'''sudo make && sudo make altinstall''' –