問題描述
在 Linux Mint 中升級 Python 版本 (Upgrade Python version in Linux Mint)
它說要做
make install
當我這樣做時它說:
If I do: su
然後輸入 passowrd 然後 make install
出現同樣的錯誤。
我該如何解決這個問題?
參考解法
方法 1:
You are probably following wrong steps. Before installing the Python from the source you should install required packages and configure source accordingly. So I suggest you to follow the steps:
Install Required Packages
$ sudo apt‑get install build‑essential checkinstall
$ sudo apt‑get install libreadline‑gplv2‑dev libncursesw5‑dev libssl‑dev libsqlite3‑dev tk‑dev libgdbm‑dev libc6‑dev libbz2‑dev
Download and extract Python 2.7.10
$ cd /usr/src
$ wget https://www.python.org/ftp/python/2.7.10/Python‑2.7.10.tgz
$ tar xzf Python‑2.7.10.tgz
Compile Python Source
$ cd Python‑2.7.10
$ sudo ./configure
$ sudo make altinstall
Check the Python Version
$ python2.7 ‑V
Source: http://tecadmin.net/install‑python‑2‑7‑on‑ubuntu‑and‑linuxmint/