[英]unable to install python 3.6 on linux
解壓縮該 python 3.6 tar.xz 文件后,我運行以下命令。
./configure
make
make install
錯誤日志:
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
當我運行 ./configure 后跟 make ,然后 make install 時,我遇到了這個錯誤!
您是否嘗試過使用sudo
權限運行上述命令?
原答案: https : //askubuntu.com/q/865554/667903
sudo make install
或
如果您使用的是 Ubuntu 16.10 或 17.04,則 Python 3.6 位於 Universe 存儲庫中,因此您只需運行
sudo apt-get update
sudo apt-get install python3.6
您的文件系統似乎是只讀的。 您必須重新掛載/usr/local/bin/
所在的分區並具有寫入權限
mount
的語法是
mount -o remount,rw /partition/identifier /mount/point
假設您在/dev/sda2
上有/
mount -o remount,rw / /dev/sda2
應該可以解決您的問題。
要檢查您的掛載點: cat /etc/fstab
或df
檢查權限: cat /proc/mounts
在安裝包含編譯器、軟件包開發工具和庫的構建要點后嘗試: sudo apt-get install build-essential
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.