I believe that many friends have just installed Ubuntu or CentOS7 and other other virtual machines. If they want to compile or use related tools, it is definitely necessary to install related libraries, plug-ins, etc., so this article will help you solve the problem of installing libraries, plug-ins, etc. One of the most common questions:
“ 正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态消息... 完成
E:无法定位软件包 xx-xx-xxx ”
If this problem occurs, it means that there is a problem with the virtual machine software source you installed, so you need to change the source (I recommend you to use the Alibaba source here, and it is effective in personal testing). I will take changing the Alibaba source as an example (my local environment is Ubuntu20. 04):
Step 1:
Enter in the Linux terminal:
sudo vim /etc/apt/sources.list
Step 2:
Enter the following command in the pop-up vim edit box, and comment out (or overwrite) all previous programs.
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
Step 3:
Enter “sudo apt-get update” to update the source
sudo apt-get update
Step 4:
Install the library or plug-in again
. At this point, the source change is successful!