日期:2014-05-16  浏览次数:20761 次

虚拟机上linux GDB无法安装
在输入命令sudo apt-get install gdb之后,
就出现了下面这些提示信息:
Reading package lists... Done
Building dependency tree  
Reading state information... Done
Suggested packages:
  gdb-doc gdbserver
The following NEW packages will be installed:
  gdb
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 2,115 kB of archives.
After this operation, 5,657 kB of additional disk space will be used.
Err http://cn.archive.ubuntu.com/ubuntu/ precise/main gdb i386 7.4-2012.02-0ubuntu2
  Temporary failure resolving 'cn.archive.ubuntu.com'
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/g/gdb/gdb_7.4-2012.02-0ubuntu2_i386.deb Temporary failure resolving 'cn.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

好像是安装失败了,请问这是怎么回事?难道是我Linux没联网?

------解决方案--------------------
明显是楼主没有联网
------解决方案--------------------
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/g/gdb/gdb_7.4-2012.02-0ubuntu2_i386.deb Temporary failure resolving 'cn.archive.ubuntu.com'

检查网络连接

没有问题的话先sudo apt-get update
------解决方案--------------------
Temporary failure resolving 'cn.archive.ubuntu.com'


检查网络设置,特别是DNS设置