解决安装软件包时出现E:无法定位的问题
短信预约 -IT技能 免费直播动态提醒
第一种情况:在确定网络连接和质量没问题的情况下,任何软件都无法安装,出现E:无法定位XXX
解决:换源
具体步骤:
备份 /etc/apt/sources.list 文件
执行命令
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
打开文件 sudo vim /etc/apt/sources.list (gedit也可以)
将原文件里面的内容删掉或注释掉
粘贴选择的源:
阿里云源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main universe restricted multiversedeb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
sudo apt-get update
第二种情况:可以安装其他的软件,但唯独无法安装ros-
1.echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list2.sudo apt update然后安装ros-melodic-xxx类的软件包就好使了。
来源地址:https://blog.csdn.net/m0_45805756/article/details/126310136
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341