您的位置:首页 > 编程语言 > Go语言

apt-get 依赖版本过高(Depends: g++-4.6(>= 4.6.3-1)but it is not going)

2013-05-12 02:07 429 查看
      在文章的开头,首先要声明,各个版本的Ubuntu的更新源是不同的,请大家使用自己相对应的源进行更新,不然会发生很多依赖问题!出现这个问题,一般都是因为自己更改了错误的源,诸如版本不对,自己是12.04版本的源改成了12.10 13.04的源,导致在使用apt-get的时候报依赖错误,以下是针对12.04 版本的源

     昨天在装edb,发现总是报错误,具体错误的信息不大记得,但是  Depends:  g++-4.6(>= 4.6.3-1)but it is not going 这种类型的错误,搜索了网上的解决方案,有这么两种解决方案(这边已安装g++为例说明):

      方案一:apt-get -finstall把欠缺的包安装完毕。再次重试:apt-getinstall
g++    (我是没成功。。。)

      方案二:降低安装包   参考  http://blog.csdn.net/delphinew/article/details/5871425
      第二种方案可行性比较小,因为你会发现要自己手动更新 N 多的包!!! 一个接一个,摇摇无期,最后我是放弃了。。。(最后还好没有这么做,要更新的包的数量用系统自动更新也长达了十来分钟。。。)

      我的解决方案是:我们从更新源来入手解决!建议使用系统最初给我们的源(本人最初使用的是科大的源)

   步骤一:  sudo gedit /etc/apt/sources.list

   步骤二:将下面的代码覆盖 /etc/apt/sources.list  的内容(我使用的是12.10,版本无影响,放心使用)

   #deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release i386 (20121017.2)]/ quantal main restricted

 

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

# newer versions of the distribution.

deb http://cn.archive.ubuntu.com/ubuntu/ quantal main restricted

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal main restricted

 

## Major bug fix updates produced after the final release of the

## distribution.

deb http://cn.archive.ubuntu.com/ubuntu/ quantal-updates main restricted

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal-updates main restricted

 

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team. Also, please note that software in universe WILL NOT receive any

## review or updates from the Ubuntu security team.

deb http://cn.archive.ubuntu.com/ubuntu/ quantal universe

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal universe

deb http://cn.archive.ubuntu.com/ubuntu/ quantal-updates universe

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal-updates universe

 

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  

## team, and may not be under a free licence. Please satisfy yourself as to  

## your rights to use the software. Also, please note that software in  

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://cn.archive.ubuntu.com/ubuntu/ quantal multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ quantal-updates multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal-updates multiverse

 

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

deb http://cn.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse

 

deb http://security.ubuntu.com/ubuntu quantal-security main restricted

deb-src http://security.ubuntu.com/ubuntu quantal-security main restricted

deb http://security.ubuntu.com/ubuntu quantal-security universe

deb-src http://security.ubuntu.com/ubuntu quantal-security universe

deb http://security.ubuntu.com/ubuntu quantal-security multiverse

deb-src http://security.ubuntu.com/ubuntu quantal-security multiverse

 

## Uncomment the following two lines to add software from Canonical's

## 'partner' repository.

## This software is not part of Ubuntu, but is offered by Canonical and the

## respective vendors as a service to Ubuntu users.

# deb http://archive.canonical.com/ubuntu quantal partner

# deb-src http://archive.canonical.com/ubuntu quantal partner

 

## This software is not part of Ubuntu, but is offered by third-party

## developers who want to ship their latest software.

deb http://extras.ubuntu.com/ubuntu quantal main

deb-src http://extras.ubuntu.com/ubuntu quantal main

 

步骤三: 保存 上面文件后,在终端输入   

sudoapt-get update && sudo apt-get upgrade
 更新下,时间会比较久!
分析:在更新的代码段中,我看到了那些包包的替换,很多很多。。。当然中间也有g++的替换

然后在安装g++ 就没有问题了

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐