How to install software in Ubuntu?

we will learn how to install software in ubuntu from the process of installing python3.7.4. There are three ways :

  1. Using the command “apt” directly;
  2. Downloading a .tgz software package from its official website, and install it;
  3. Downloading a .deb software package from its official website, and install it.

The 1) is simple and convenient ,but the software maybe isn’t the latest version. The 2) & 3) need us to find the source, but we can determine to download a certain version.

OK , we are starting to learn.
Oh, my god! while my colleague was running on the Python-3.7.4, I was walking on the Python-3.5.1. I must keep up with him. How to change my Python-3.5.1 to his Python3.7.4.
firstly, I thought I should update it. So I input the following command in the terminal :

sudo apt update

However there no new update. Maybe I should remove the old version before I install a new version. So I input the next commands :

sudo apt remove python3
sudo apt install python3
python3 --version

However the version of python3 is still 3.5.1. Oh, How to express my emotion? very anxiety. There must be a other way to resolve it.

Secondly, I searched the python3, and found its official website: https://www.python.org/. Yeah, There were so many versions I could choose, I must find the latest version. Yes, I found the .tgz link of python-3.7.4: https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz. So I entry the download file, and I input the command:

wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

And decompress it:

tar zxvf Python-3.7.4.tgz -C ./

Ok, now we have a installation package, the next question is how to install it. After I searched the question in baidu, I have gotten it. I entered the Python-3.7.4, and input the following commands:

./configure
make
sudo make install

No problem, all the best.
Em? There an error : ModuleNotFoundError: No module named ‘_ctypes’. What is it? I really thank all who can share their questions. I know the answer again. There was a new development package libffi-devel need to install. Ok, I find its source package. and I used the command get it again:

wget http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi-dev_3.2.1-4_amd64.deb

Oh? it is a .deb installation package. Yes I met a familiar question how to install it. So I still got it in Internet. I entered the Download file and input the following command :

sudo dpkg -i ibffi-dev_3.2.1-4_amd64.deb

Finally, I went back the Python-3.7.4 file and input “sudo make install”. OK, the python-3.7.4 had been installed. At the time, I had been happy but not excited . So, I writed this dairy for recording the process.

Thanks
July 18th. 2019

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值