Cannot install g++ in ubuntu 12.04 -
i have installed ubuntu 12.04. now, want install g++. so, run command:
sudo apt-get install g++
but receive error:
reading package lists... done building dependency tree reading state information... done following packages installed: g++-4.6 libstdc++6-4.6-dev suggested packages: g++-multilib g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg libstdc++6-4.6-doc following new packages installed: g++ g++-4.6 libstdc++6-4.6-dev 0 upgraded, 3 newly installed, 0 remove , 0 not upgraded. need 6,745 kb/8,389 kb of archives. after operation, 24.0 mb of additional disk space used. want continue [y/n]? y err http://us.archive.ubuntu.com/ubuntu/ precise/main g++-4.6 i386 4.6.3-1ubuntu5 not connect 113.171.224.178:80 (113.171.224.178). - connect (111: connection refused) [ip: 91.189.91.15 80] failed fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.6/g++-4.6_4.6.3-1ubuntu5_i386.deb not connect 113.171.224.178:80 (113.171.224.178). - connect (111: connection refused) [ip: 91.189.91.15 80] e: unable fetch archives, maybe run apt-get update or try --fix-missing?
next, run command:
sudo apt-get update
and receive others
hit http://us.archive.ubuntu.com precise release.gpg get:1 http://security.ubuntu.com precise-security release.gpg [198 b] hit http://extras.ubuntu.com precise release.gpg hit http://ppa.launchpad.net precise release.gpg get:2 http://us.archive.ubuntu.com precise-updates release.gpg [198 b] get:3 http://us.archive.ubuntu.com precise-backports release.gpg [198 b] get:4 http://security.ubuntu.com precise-security release [49.6 kb] hit http://extras.ubuntu.com precise release hit http://us.archive.ubuntu.com precise release hit http://ppa.launchpad.net precise release get:5 http://us.archive.ubuntu.com precise-updates release [49.6 kb] hit http://extras.ubuntu.com precise/main sources hit http://ppa.launchpad.net precise/main sources get:6 http://security.ubuntu.com precise-security/main sources [65.1 kb] hit http://extras.ubuntu.com precise/main i386 packages hit http://ppa.launchpad.net precise/main i386 packages get:7 http://us.archive.ubuntu.com precise-backports release [49.6 kb] ign http://extras.ubuntu.com precise/main translationindex ign http://ppa.launchpad.net precise/main translationindex get:8 http://security.ubuntu.com precise-security/restricted sources [1,950 b] get:9 http://security.ubuntu.com precise-security/universe sources [24.0 kb] get:10 http://security.ubuntu.com precise-security/multiverse sources [1,380 b] get:11 http://security.ubuntu.com precise-security/main i386 packages [245 kb] get:12 http://us.archive.ubuntu.com precise/restricted sources [5,470 b] hit http://us.archive.ubuntu.com precise/universe sources hit http://us.archive.ubuntu.com precise/multiverse sources hit http://us.archive.ubuntu.com precise/main i386 packages hit http://us.archive.ubuntu.com precise/restricted i386 packages hit http://us.archive.ubuntu.com precise/universe i386 packages hit http://us.archive.ubuntu.com precise/multiverse i386 packages hit http://us.archive.ubuntu.com precise/main translationindex get:13 http://us.archive.ubuntu.com precise-backports release [49.6 kb] get:14 http://us.archive.ubuntu.com precise/main sources [934 kb] ign http://us.archive.ubuntu.com precise-backports release get:15 http://security.ubuntu.com precise-security/restricted i386 packages [3,968 b] get:16 http://security.ubuntu.com precise-security/universe i386 packages [73.0 kb] get:17 http://security.ubuntu.com precise-security/multiverse i386 packages [2,369 b] hit http://security.ubuntu.com precise-security/main translationindex hit http://security.ubuntu.com precise-security/multiverse translationindex hit http://security.ubuntu.com precise-security/restricted translationindex hit http://security.ubuntu.com precise-security/universe translationindex hit http://security.ubuntu.com precise-security/main translation-en hit http://security.ubuntu.com precise-security/multiverse translation-en hit http://security.ubuntu.com precise-security/restricted translation-en hit http://security.ubuntu.com precise-security/universe translation-en ign http://extras.ubuntu.com precise/main translation-en_us ign http://ppa.launchpad.net precise/main translation-en_us ign http://extras.ubuntu.com precise/main translation-en ign http://ppa.launchpad.net precise/main translation-en hit http://us.archive.ubuntu.com precise/multiverse translationindex hit http://us.archive.ubuntu.com precise/restricted translationindex hit http://us.archive.ubuntu.com precise/universe translationindex get:18 http://us.archive.ubuntu.com precise-updates/main sources [374 kb] get:19 http://us.archive.ubuntu.com precise-updates/restricted sources [5,494 b] get:20 http://us.archive.ubuntu.com precise-updates/universe sources [83.4 kb] get:21 http://us.archive.ubuntu.com precise-updates/multiverse sources [4,746 b] get:22 http://us.archive.ubuntu.com precise-updates/main i386 packages [603 kb] get:23 http://us.archive.ubuntu.com precise-updates/restricted i386 packages [10.1 kb] get:24 http://us.archive.ubuntu.com precise-updates/universe i386 packages [194 kb] get:25 http://us.archive.ubuntu.com precise-updates/multiverse i386 packages [10.4 kb] hit http://us.archive.ubuntu.com precise-updates/main translationindex hit http://us.archive.ubuntu.com precise-updates/multiverse translationindex hit http://us.archive.ubuntu.com precise-updates/restricted translationindex hit http://us.archive.ubuntu.com precise-updates/universe translationindex hit http://us.archive.ubuntu.com precise/main translation-en ign http://us.archive.ubuntu.com precise-backports/main sources/diffindex ign http://us.archive.ubuntu.com precise-backports/restricted sources/diffindex ign http://us.archive.ubuntu.com precise-backports/universe sources/diffindex ign http://us.archive.ubuntu.com precise-backports/multiverse sources/diffindex ign http://us.archive.ubuntu.com precise-backports/main i386 packages/diffindex ign http://us.archive.ubuntu.com precise-backports/restricted i386 packages/diffindex ign http://us.archive.ubuntu.com precise-backports/universe i386 packages/diffindex ign http://us.archive.ubuntu.com precise-backports/multiverse i386 packages/diffindex hit http://us.archive.ubuntu.com precise-backports/main translationindex hit http://us.archive.ubuntu.com precise-backports/multiverse translationindex hit http://us.archive.ubuntu.com precise-backports/universe translationindex hit http://us.archive.ubuntu.com precise/multiverse translation-en hit http://us.archive.ubuntu.com precise/restricted translation-en hit http://us.archive.ubuntu.com precise/universe translation-en hit http://us.archive.ubuntu.com precise-updates/main translation-en hit http://us.archive.ubuntu.com precise-updates/multiverse translation-en hit http://us.archive.ubuntu.com precise-updates/restricted translation-en hit http://us.archive.ubuntu.com precise-updates/universe translation-en hit http://us.archive.ubuntu.com precise-backports/main sources get:26 http://us.archive.ubuntu.com precise-backports/restricted translationindex [3,341 kb] hit http://us.archive.ubuntu.com precise-backports/restricted sources hit http://us.archive.ubuntu.com precise-backports/universe sources hit http://us.archive.ubuntu.com precise-backports/multiverse sources hit http://us.archive.ubuntu.com precise-backports/main i386 packages hit http://us.archive.ubuntu.com precise-backports/restricted i386 packages hit http://us.archive.ubuntu.com precise-backports/universe i386 packages hit http://us.archive.ubuntu.com precise-backports/multiverse i386 packages hit http://us.archive.ubuntu.com precise-backports/main translation-en hit http://us.archive.ubuntu.com precise-backports/multiverse translation-en hit http://us.archive.ubuntu.com precise-backports/universe translation-en fetched 7,012 kb in 19s (352 kb/s) w: gpg error: http://us.archive.ubuntu.com precise-backports release: following signatures invalid: badsig 40976eaf437d05b5 ubuntu archive automatic signing key <ftpmaster@ubuntu.com> w: failed fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/i18n/index no hash entry in release file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise-backports_restricted_i18n_index e: index files failed download. have been ignored, or old ones used instead.
to check repository, run command: cat /etc/apt/sources.list. below output
# deb cdrom:[ubuntu 12.04.2 lts _precise pangolin_ - release i386 (20130213)]/ precise main restricted # see http://help.ubuntu.com/community/upgradenotes how upgrade # newer versions of distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted ## major bug fix updates produced after final release of ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted ## n.b. software repository entirely unsupported ubuntu ## team. also, please note software in universe not receive ## review or updates ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise universe deb-src http://us.archive.ubuntu.com/ubuntu/ precise universe deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates universe ## n.b. software repository entirely unsupported ubuntu ## team, , may not under free licence. please satisfy ## rights use software. also, please note software in ## multiverse not receive review or updates ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse ## n.b. software repository may not have been tested ## extensively contained in main release, although includes ## newer versions of applications may provide useful features. ## also, please note software in backports not receive review ## or updates ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/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 ## uncomment following 2 lines add software canonical's ## 'partner' repository. ## software not part of ubuntu, offered canonical , ## respective vendors service ubuntu users. # deb http://archive.canonical.com/ubuntu precise partner # deb-src http://archive.canonical.com/ubuntu precise partner ## software not part of ubuntu, offered third-party ## developers want ship latest software. deb http://extras.ubuntu.com/ubuntu precise main deb-src http://extras.ubuntu.com/ubuntu precise main
please me install g++ on ubuntu. version of gcc 4.6.3
thank much
i'd faced similar issue few months back. changed repository server lk.archive.ubuntu.com (which ubuntu had installed default) ubuntu main server archive.ubuntu.com. did "apt-get update" after , went smooth.
the regional servers down sometimes. may try changing main server. can either hand editing /etc/apt/sources.list file or ubuntu software centre in click of button.
Comments
Post a Comment