IT软件
当前位置 :首页工程软件IT软件

ubuntu apt-get出现"couldn't find package"问题的解决方法

来源: 作者: 时间:2011-03-28 点击:

1、首先检查ping www.baidu.com,看是否正常,如果不正常,则做以下操作

修改IP地址:sudo vim /etc/network/interfaces
address为你的IP地址,netmask为你的掩码,gateway为你的网关
auto eth0
iface eth0 inet static
address 219.218.122.168
netmask  255.255.255.0
gateway  219.218.122.254


修改DNS: sudo vim /etc/resolv.conf
nameserver 8.8.8.8

重启网络使之生效:sudo /etc/init.d/networking restart
2、编辑/etc/apt/sources.list文件:

#deb http://mirror.sohu.com/ubuntu gutsy main restricted universe multiverse
#deb http://mirror.sohu.com/ubuntu gutsy-security main restricted universe multiverse
#deb http://mirror.sohu.com/ubuntu gutsy-updates main restricted universe multiverse
#deb http://mirror.sohu.com/ubuntu gutsy-backports main restricted universe multiverse
#deb http://mirror.sohu.com/ubuntu/ubuntu-cn gutsy main restricted universe multiverse
#deb-src http://mirror.sohu.com/ubuntu gutsy main restricted universe multiverse
#deb-src http://mirror.sohu.com/ubuntu gutsy-security main restricted universe multiverse
#deb-src http://mirror.sohu.com/ubuntu gutsy-updates main restricted universe multiverse
#deb-src http://mirror.sohu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb http://ppa.launchpad.net/tormodvolden/ubuntu hardy main

上一篇:
下一篇: 已经是最后一篇
最新评论共有 位网友发表了评论
发表评论
用户名: 密码: 游客发言不需要密码