How to install software in Ubuntu?

it2022-05-05  256

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

Using the command “apt” directly;Downloading a .tgz software package from its official website, and install it;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


最新回复(0)