[英]unable to install python 3.6 on linux
I run below commands after unzipping that python 3.6 tar.xz file.解压缩该 python 3.6 tar.xz 文件后,我运行以下命令。
./configure
make
make install
Error log:错误日志:
ranlib libpython3.6m.a
gcc -pthread -Xlinker -export-dynamic -o python Programs/python.o libpython3.6m.a -lpthread -ldl -lutil -lrt -lm
if test "no-framework" = "no-framework" ; then \
/usr/bin/install -c python /usr/local/bin/python3.6m; \
else \
/usr/bin/install -c -s Mac/pythonw /usr/local/bin/python3.6m; \
fi
/usr/bin/install: cannot create regular file `/usr/local/bin/python3.6m': Read-only file system
make: *** [altbininstall] Error 1
When i run ./configure followed by make , and then make install i run into this error!当我运行 ./configure 后跟 make ,然后 make install 时,我遇到了这个错误!
Have you tried running the above commands using sudo
powers?您是否尝试过使用
sudo
权限运行上述命令?
original answer: https://askubuntu.com/q/865554/667903原答案: https : //askubuntu.com/q/865554/667903
sudo make install
or或
If you are using Ubuntu 16.10 or 17.04, then Python 3.6 is in the universe repository, so you can just run如果您使用的是 Ubuntu 16.10 或 17.04,则 Python 3.6 位于 Universe 存储库中,因此您只需运行
sudo apt-get update
sudo apt-get install python3.6
Your filesystem seems to be read-only.您的文件系统似乎是只读的。 You have to remount the partition where
/usr/local/bin/
is located with write permissions您必须重新挂载
/usr/local/bin/
所在的分区并具有写入权限
The syntax for mount
is mount
的语法是
mount -o remount,rw /partition/identifier /mount/point
Let's say you have /
on /dev/sda2
假设您在
/dev/sda2
上有/
mount -o remount,rw / /dev/sda2
should fix your problem.应该可以解决您的问题。
To check your mount points: cat /etc/fstab
or df
要检查您的挂载点:
cat /etc/fstab
或df
To check the permissions: cat /proc/mounts
检查权限:
cat /proc/mounts
在安装包含编译器、软件包开发工具和库的构建要点后尝试: sudo apt-get install build-essential
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.