当前位置:   article > 正文

在安装opencv时,sudo apt-get install build-essential 报错_sudo apt-get install build-essential 404

sudo apt-get install build-essential 404

输入:sudo apt-get install build-essential
更新不完成,而且总是下载不了,网速慢
E: 无法下载 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 101.6.8.193 80]

我得解决办法:更换Ubuntu源列表,我使用的Ubuntu18.04,源文件在 /etc/apt/sources.list中,首先进行备份

  1. 备份sources.list

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

2.修改 /etc/apt/sources.list 中内容
sudo gedit /etc/apt/sources.list 打开并修改源中内容

原来得源列表:

代码插入不进去注释删除掉了,只保留原来源列表中的非注释内容,sources.list 中内容复制到本文中时,csdn就死了。。。

deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

更改后得源列表

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-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 main restricted universe multiverse

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

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

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

deb-src http://mirrors.aliyun.com/ubuntu/
bionic-backports main restricted universe multiverse
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

3.更新
sudo apt-get update
sudo apt-get upgrade

参考链接

https://blog.csdn.net/weixin_44174099/article/details/89061637

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/843403
推荐阅读
相关标签
  

闽ICP备14008679号