Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/c/chkconfig/chkconfig_11.4.54.60.1debian1_all.deb Could not resolve 'mirrordirec

简介:

在安装chkconfig的过程中,遇到如下问题:

haochuang@raspberrypi:~/webapp $ sudo apt-get install chkconfig
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following NEW packages will be installed:
chkconfig
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,766 B of archives.
After this operation, 59.4 kB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main chkconfig all 11.4.54.60.1debian1
Could not resolve 'mirrordirector.raspbian.org'
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/c/chkconfig/chkconfig_11.4.54.60.1debian1_all.deb Could not resolve 'mirrordirector.raspbian.org'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

lifeccp@raspberrypi:~ $ sudo apt-get install chkconfig --fix-missing
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following NEW packages will be installed:
chkconfig
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,766 B of archives.
After this operation, 59.4 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
chkconfig
Install these packages without verification? [y/N] y
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main chkconfig all 11.4.54.60.1debian1
404 Not Found
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/c/chkconfig/chkconfig_11.4.54.60.1debian1_all.deb 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

 

可以尝试按照如下方式去解决:

1、修改源地址:

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

加入如下内容:

复制代码
#中科大:
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
deb http://mirrors.ustc.edu.cn/ubuntu/ precise universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

#比较快的源:

#搜狐源:
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

#网易源:
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse

#163镜像站点
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
 

#阿里源
deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
复制代码

添加完成之后保存,且sudo apt-get update,更新成功

 

更新看看速度:

sudo apt-get update
sudo apt-get upgrade

 

在Ubuntu官方提供了源列表,可以参考:http://wiki.ubuntu.org.cn/源列表

 

另外,下面附上一些常用的apt-get相关操作

复制代码
apt-cache search package 搜索包
apt-cache show package 获取包的相关信息,如说明、大小、版本等
sudo apt-get install package 安装包
sudo apt-get install package – - reinstall 重新安装包
sudo apt-get -f install 修复安装”-f = ——fix-missing”
sudo apt-get remove package 删除包
sudo apt-get remove package – - purge 删除包,包括删除配置文件等
sudo apt-get update 更新源
sudo apt-get upgrade 更新已安装的包
sudo apt-get dist-upgrade 升级系统
sudo apt-get dselect-upgrade 使用 dselect 升级
apt-cache depends package 了解使用依赖
apt-cache rdepends package 是查看该包被哪些包依赖
sudo apt-get build-dep package 安装相关的编译环境
apt-get source package 下载该包的源代码
sudo apt-get clean && sudo apt-get autoclean 清理无用的包
sudo apt-get check 检查是否有损坏的依赖

其中:
1 有SUDO的表示需要管理员特权!
2 在UBUNTU中命令后面参数为短参数是用“-”引出,长参数用“——”引出
3 命令帮助信息可用man 命令的方式查看或者命令 -H(——help)方式查看
4 在MAN命令中需要退出命令帮助请按“q”键!!

选项 含义 作用
sudo -h Help 列出使用方法,退出。
sudo -V Version 显示版本信息,并退出。
sudo -l List 列出当前用户可以执行的命令。只有在sudoers里的用户才能使用该选项。
sudo -u username|#uid User 以指定用户的身份执行命令。后面的用户是除root以外的,可以是用户名,也可以是#uid。
sudo -k Kill 清除“入场卷”上的时间,下次再使用sudo时要再输入密码。
sudo -K Sure kill 与-k类似,但是它还要撕毁“入场卷”,也就是删除时间戳文件。
sudo -b command Background 在后台执行指定的命令。
sudo -p prompt command Prompt 可以更改询问密码的提示语,其中%u会代换为使用者帐号名称,%h会显示主机名称。非常人性化的设计。
sudo -e file Edit 不是执行命令,而是修改文件,相当于命令sudoedit。
复制代码

 

sudo sed -i '$a deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi' /etc/apt/sources.list
cat /etc/apt/sources.list

 


本文转自 念槐聚 博客园博客,原文链接:http://www.cnblogs.com/haochuang/p/6222017.html,如需转载请自行联系原作者

相关文章
|
8月前
|
机器学习/深度学习 前端开发 JavaScript
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
154 0
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
|
存储 安全 Ubuntu
解决E: 仓库 “http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic InRelease” 没有数字签名问题
解决E: 仓库 “http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic InRelease” 没有数字签名问题
708 0
|
5月前
|
Web App开发 监控 UED
如何解决Angular中的Error: HTTP request failed, call timeout问题
在Angular应用中,遇到HTTP请求超时错误`Error: HTTP request failed, call timeout`时,可通过多种途径解决。首先,可增加请求超时时间,Angular默认无超时限制,设置合理的超时时间如5秒有助于避免长时间等待无响应。其次,检查服务器响应时间,利用开发者工具监控网络请求,优化服务器端代码或调整超时值。最后,确认网络连接稳定性,使用`navigator.onLine`检测网络状态,并在不同网络环境中测试。这些策略共同作用,能够有效提升应用的稳定性和用户体验。
249 1
|
5月前
|
iOS开发 MacOS Python
【Mac 系统】解决已有清华镜像但出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url
在尝试使用清华镜像创建conda环境时遇到下载超时问题,通过删除原有镜像并添加针对Mac OS的清华镜像解决了该问题。
144 3
|
5月前
|
Python
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
|
7月前
|
小程序
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
166 4
|
数据安全/隐私保护 Python
解决CondaHTTPError:HTTP 000 CONNECTION FAILED for url<https://mirrors.tuna.tsinghua.edu.cn/anaconda***
今天做项目的时候,Python导入一个包一直有各类问题,而后最终锁定问题是CondaHTTPError:HTTP 000 CONNECTION FAILED for url<https://mirrors.tuna.tsinghua.edu.cn/anaconda*** 这就是清华的源出问题了,配置没配对。
解决CondaHTTPError:HTTP 000 CONNECTION FAILED for url<https://mirrors.tuna.tsinghua.edu.cn/anaconda***
|
7月前
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
188 1
|
Linux
Could not fetch/save url http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoError 403
Could not fetch/save url http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoError 403
1746 1
|
Web App开发 JavaScript 前端开发
解决DevTools failed to load SourceMap Could not load content for .js.map HTTP error code 404 问题
解决DevTools failed to load SourceMap Could not load content for .js.map HTTP error code 404 问题
935 0