Here is my case:
I am using Ubuntu 10.04 (Lucid Lynx). The system's default Python is v2.6.5, but I need Python v2.7. So I downloaded the source from python.org and tried to install it.
The first time I installed it, I ran:
cd Python2.7.4
./configure --prefix=/usr
make
su root
make install
This installs Python 2.7 to my system. It will create a link, "python", in /usr/bin
linking to python2.7
also in /usr/bin
. So when I type >python
, the system will start Python 2.7.4 for me just like when I type >python2.7
.
But when I install this way:
cd Python2.7.4
./configure --prefix=/usr
make
su root
make altinstall
The link "python" in /usr/bin
still exists and links to python2.6
which is the default system version. Of course, I can remove it and create a new soft link linking to python2.7
.
What is the difference between the command "make install" and "make altinstall", except for the link in /usr/bin
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…