这件事情是经过是这个样子的~因为一些缘故电脑重装了一个系统

我打算安装虚拟机VMware Workstation,下载后安装出现这个页面

经过一番查阅,需要安装内核开发包,yum -y install kernel-devel

在安装过程中出现 Command 'yum' not found, did you mean

我当时一想(是不是找不到 yum ,我没有啊,我得安装一下,我得有)

我就sudo apt-get install yum

结果是 E: 无法定位软件包 yum

还不让我下载安装yum,我就更新一下sudo apt-get update  也报错了

应该是镜像源不行(镜像源就是下载软件包的地方,就好比是手机的app商店)

我就东查西查,换了好几个镜像源,发现很多文章的镜像源都不行。

最后找到了清华镜像源

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

由于耗费了些时间,把这个经过记录分享一下

如果想换镜像源,推荐还是把之前的镜像源文件做一个备份(万一弄错了,还有回旋的余地hhh)

我们先进入su 

输入我们的密码啪啦啪啦(键盘的声音)

因为镜像源文件在/etc/apt/sources.list

我们先把这个镜像源拷贝一下~   改个名字

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

拷贝完了我们就开整

sudo gedit /etc/apt/sources.list

以文本的形式打开镜像源文件。把上面的清华镜像源全部复制下来,把打开的文本里面的内容全部删掉,把复制的粘贴上。(只有清华镜像源),好了我们就点保存

然后退出root模式,进行更新sudo apt-get update 一下子就成功了,bilibili一堆码

最后我就开心的下载了yum    

sudo apt-get install yum

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐