c++ compiler not working....even build essential package not getting loaded

Asked by Mohammad Anees

hi,

i am trying to compile my c++ program but the compiler is not working. below is the terminal window transcripts

anees@anees-laptop:~/cpp/assignment$ g++ test.cpp
The program 'g++' can be found in the following packages:
 * g++
 * pentium-builder
Try: sudo apt-get install <selected package>

anees@anees-laptop:~/cpp/assignment$ c++ test.cpp
The program 'c++' can be found in the following packages:
 * g++
 * pentium-builder
Try: sudo apt-get install <selected package>

please help me to resolve this...

thanks,
anees

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Mohammad Anees (mdanees20) said :
#1

here is other transcript from terminal window

anees@anees-laptop:~/cpp/assignment$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package build-essential has no installation candidate

Revision history for this message
Mohammad Anees (mdanees20) said :
#2

can anyone please help me in this, i am trying for it for last 3 hours.... :(

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Can you give the output of:

lsb_release -a; uname -a

Thanks

Revision history for this message
Mohammad Anees (mdanees20) said :
#4

this was the output...

anees@anees-laptop:~/cpp/assignment$ lsb_release -a; uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Linux anees-laptop 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:09:46 UTC 2011 i686 GNU/Linux
anees@anees-laptop:~/cpp/assignment$

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

Please try:

sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get upgrade
sudo apt-get clean
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get --reinstall install build-essential

Revision history for this message
Mohammad Anees (mdanees20) said :
#6

i got this...

anees@anees-laptop:~/cpp/assignment$ sudo apt-get -f install
[sudo] password for anees:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
anees@anees-laptop:~/cpp/assignment$ sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
anees@anees-laptop:~/cpp/assignment$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
anees@anees-laptop:~/cpp/assignment$ sudo apt-get clean
anees@anees-laptop:~/cpp/assignment$ sudo apt-get update
Err http://security.ubuntu.com lucid-security Release.gpg
  Could not connect to security.ubuntu.com:80 (91.189.92.166). - connect (110: Connection timed out)
Err http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_IN
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_IN
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_IN
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_IN
  Unable to connect to security.ubuntu.com:http:
Ign http://security.ubuntu.com lucid-security Release
Ign http://security.ubuntu.com lucid-security/main Packages
Ign http://security.ubuntu.com lucid-security/restricted Packages
Ign http://security.ubuntu.com lucid-security/restricted Sources
Ign http://security.ubuntu.com lucid-security/main Sources
Ign http://security.ubuntu.com lucid-security/multiverse Sources
Ign http://security.ubuntu.com lucid-security/universe Sources
Ign http://security.ubuntu.com lucid-security/universe Packages
Ign http://security.ubuntu.com lucid-security/multiverse Packages
Ign http://security.ubuntu.com lucid-security/main Packages
Ign http://security.ubuntu.com lucid-security/restricted Packages
Ign http://security.ubuntu.com lucid-security/restricted Sources
Ign http://security.ubuntu.com lucid-security/main Sources
Ign http://security.ubuntu.com lucid-security/multiverse Sources
Ign http://security.ubuntu.com lucid-security/universe Sources
Ign http://security.ubuntu.com lucid-security/universe Packages
Ign http://security.ubuntu.com lucid-security/multiverse Packages
Err http://security.ubuntu.com lucid-security/main Packages
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/restricted Packages
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/restricted Sources
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/main Sources
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/multiverse Sources
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/universe Sources
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/universe Packages
  Unable to connect to security.ubuntu.com:http:
Err http://security.ubuntu.com lucid-security/multiverse Packages
  Unable to connect to security.ubuntu.com:http:
Err http://archive.ubuntu.com lucid Release.gpg
  Could not connect to archive.ubuntu.com:80 (91.189.88.46). - connect (110: Connection timed out) [IP: 91.189.88.46 80]
Ign http://archive.ubuntu.com lucid Release
Err http://in.archive.ubuntu.com lucid Release.gpg
  Could not connect to in.archive.ubuntu.com:80 (91.189.88.30). - connect (110: Connection timed out) [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates Release.gpg
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_IN
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Ign http://archive.ubuntu.com lucid/main Sources
Ign http://in.archive.ubuntu.com lucid Release
Ign http://in.archive.ubuntu.com lucid-updates Release
Ign http://archive.ubuntu.com lucid/restricted Sources
Ign http://in.archive.ubuntu.com lucid/main Packages
Ign http://in.archive.ubuntu.com lucid/restricted Packages
Ign http://in.archive.ubuntu.com lucid/restricted Sources
Ign http://in.archive.ubuntu.com lucid/main Sources
Ign http://in.archive.ubuntu.com lucid/multiverse Sources
Ign http://in.archive.ubuntu.com lucid/universe Sources
Ign http://in.archive.ubuntu.com lucid/universe Packages
Ign http://in.archive.ubuntu.com lucid/multiverse Packages
Ign http://archive.ubuntu.com lucid/main Sources
Ign http://in.archive.ubuntu.com lucid-updates/main Packages
Ign http://in.archive.ubuntu.com lucid-updates/restricted Packages
Ign http://in.archive.ubuntu.com lucid-updates/restricted Sources
Ign http://in.archive.ubuntu.com lucid-updates/main Sources
Ign http://in.archive.ubuntu.com lucid-updates/multiverse Sources
Ign http://in.archive.ubuntu.com lucid-updates/universe Sources
Ign http://in.archive.ubuntu.com lucid-updates/universe Packages
Ign http://in.archive.ubuntu.com lucid-updates/multiverse Packages
Ign http://in.archive.ubuntu.com lucid/main Packages
Ign http://in.archive.ubuntu.com lucid/restricted Packages
Ign http://archive.ubuntu.com lucid/restricted Sources
Ign http://in.archive.ubuntu.com lucid/restricted Sources
Ign http://in.archive.ubuntu.com lucid/main Sources
Ign http://in.archive.ubuntu.com lucid/multiverse Sources
Ign http://in.archive.ubuntu.com lucid/universe Sources
Ign http://in.archive.ubuntu.com lucid/universe Packages
Ign http://in.archive.ubuntu.com lucid/multiverse Packages
Ign http://in.archive.ubuntu.com lucid-updates/main Packages
Ign http://in.archive.ubuntu.com lucid-updates/restricted Packages
Ign http://in.archive.ubuntu.com lucid-updates/restricted Sources
Ign http://in.archive.ubuntu.com lucid-updates/main Sources
Err http://archive.ubuntu.com lucid/main Sources
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.46 80]
Ign http://in.archive.ubuntu.com lucid-updates/multiverse Sources
Ign http://in.archive.ubuntu.com lucid-updates/universe Sources
Ign http://in.archive.ubuntu.com lucid-updates/universe Packages
Ign http://in.archive.ubuntu.com lucid-updates/multiverse Packages
Err http://in.archive.ubuntu.com lucid/main Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid/restricted Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid/restricted Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid/main Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid/multiverse Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid/universe Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://archive.ubuntu.com lucid/restricted Sources
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.46 80]
Err http://in.archive.ubuntu.com lucid/universe Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid/multiverse Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/main Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/restricted Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/restricted Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/main Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/multiverse Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/universe Sources
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/universe Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
Err http://in.archive.ubuntu.com lucid-updates/multiverse Packages
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg Could not connect to archive.ubuntu.com:80 (91.189.88.46). - connect (110: Connection timed out) [IP: 91.189.88.46 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg Could not connect to in.archive.ubuntu.com:80 (91.189.88.30). - connect (110: Connection timed out) [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/restricted/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/universe/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/Release.gpg Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/main/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/restricted/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/universe/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/multiverse/i18n/Translation-en_IN.bz2 Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/Release.gpg Could not connect to security.ubuntu.com:80 (91.189.92.166). - connect (110: Connection timed out)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/main/i18n/Translation-en_IN.bz2 Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/restricted/i18n/Translation-en_IN.bz2 Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/universe/i18n/Translation-en_IN.bz2 Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/multiverse/i18n/Translation-en_IN.bz2 Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/main/binary-i386/Packages.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/restricted/binary-i386/Packages.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/restricted/source/Sources.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/main/source/Sources.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/multiverse/source/Sources.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/universe/source/Sources.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/universe/binary-i386/Packages.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/multiverse/binary-i386/Packages.gz Unable to connect to security.ubuntu.com:http:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources.gz Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.46 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/main/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/restricted/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/restricted/source/Sources.gz Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.46 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/restricted/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/universe/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/universe/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/main/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/restricted/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/restricted/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/main/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/multiverse/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/universe/source/Sources.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/universe/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/lucid-updates/multiverse/binary-i386/Packages.gz Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.30 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.
anees@anees-laptop:~/cpp/assignment$

Please help...

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Change from the india server to the main (or any other server), looks like it's currently unavailable, then retry

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#8

Please change server go to main server using the software-center options and retry...

Revision history for this message
Mohammad Anees (mdanees20) said :
#9

when i did it to main server its coming like this

anees@anees-laptop:~/cpp/assignment$ sudo apt-get --reinstall install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dpkg-dev fakeroot g++ g++-4.4 libstdc++6-4.4-dev patch xz-utils
Suggested packages:
  debian-keyring debian-maintainers g++-multilib g++-4.4-multilib
  gcc-4.4-doc libstdc++6-4.4-dbg libstdc++6-4.4-doc diffutils-doc
The following NEW packages will be installed:
  build-essential dpkg-dev fakeroot g++ g++-4.4 libstdc++6-4.4-dev patch
  xz-utils
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,572kB of archives.
After this operation, 24.6MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  libstdc++6-4.4-dev g++-4.4 g++ xz-utils patch dpkg-dev build-essential
  fakeroot
Install these packages without verification [y/N]? y
Err http://archive.ubuntu.com/ubuntu/ lucid/main libstdc++6-4.4-dev 4.4.3-4ubuntu5
  Could not connect to archive.ubuntu.com:80 (91.189.92.169). - connect (110: Connection timed out) [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid/main g++-4.4 4.4.3-4ubuntu5
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid/main g++ 4:4.4.3-1ubuntu1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid/main xz-utils 4.999.9beta+20091116-1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid/main patch 2.6-2ubuntu1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid-updates/main dpkg-dev 1.15.5.6ubuntu4.5
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid/main build-essential 11.4build1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Err http://archive.ubuntu.com/ubuntu/ lucid/main fakeroot 1.14.4-1ubuntu1
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.4/libstdc++6-4.4-dev_4.4.3-4ubuntu5_i386.deb Could not connect to archive.ubuntu.com:80 (91.189.92.169). - connect (110: Connection timed out) [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.4/g++-4.4_4.4.3-4ubuntu5_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/g++_4.4.3-1ubuntu1_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/x/xz-utils/xz-utils_4.999.9beta+20091116-1_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/patch/patch_2.6-2ubuntu1_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.15.5.6ubuntu4.5_all.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/build-essential/build-essential_11.4build1_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/f/fakeroot/fakeroot_1.14.4-1ubuntu1_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.169 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

and still not working..

Revision history for this message
Mohammad Anees (mdanees20) said :
#10

one more thing, i am using proxy server, is it that it could not connect to internet through terminal window ?

though i am using internet through browser on same system....
please let me know if there can be a problem in internet connection.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#11

yes is due your proxy settings please add a file into your system replace the

http://localhost:3142 into below command and run it from terminal

echo 'Acquire::http { Proxy "http://localhost:3142"; };' | sudo tee /etc/apt/apt.conf.d/01proxy

Revision history for this message
Mohammad Anees (mdanees20) said :
#12

Hi,
 i couldn't get how to proceed with above steps. can you please let me know in detailed way.
thanks....

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#13

Please tell your proxy setting:

http_address

http_port

Revision history for this message
Mohammad Anees (mdanees20) said :
#14

netmon.iitb.ac.in
80

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#15

Open a terminal and copy and paste the row below from here to terminal then press enter:

gksudo gedit /etc/apt/apt.conf.d/01proxy

Acquire::http { Proxy "http://netmon.iitb.ac.in:80"; };

save exit and try...

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get --reinstall install build-essential

Revision history for this message
Mohammad Anees (mdanees20) said :
#16

Hi,

I just edited the 01proxy file and added the below lines

Acquire::http { Proxy "http://netmon.iitb.ac.in:80"; };

and then executed sudo apt-get update commonds. in starting it ran fine but...
i got as below

anees@anees-laptop:~$ sudo apt-get update
[sudo] password for anees:
Ign http://archive.ubuntu.com lucid Release.gpg
Ign http://archive.ubuntu.com/ubuntu/ lucid/main Translation-en_IN
Ign http://archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_IN
Err http://archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_IN
  Connection timed out
Ign http://archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_IN
Err http://archive.ubuntu.com lucid-updates Release.gpg
  Connection timed out
Ign http://archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_IN
Ign http://archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_IN
Err http://archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_IN
  Connection timed out
Ign http://archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_IN
Err http://archive.ubuntu.com lucid-security Release.gpg
  Connection timed out
Ign http://archive.ubuntu.com/ubuntu/ lucid-security/main Translation-en_IN
Ign http://archive.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_IN
Ign http://archive.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_IN
Ign http://archive.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_IN
Ign http://archive.ubuntu.com lucid Release
Ign http://archive.ubuntu.com lucid-updates Release
Ign http://archive.ubuntu.com lucid-security Release
Ign http://archive.ubuntu.com lucid/main Sources
Ign http://archive.ubuntu.com lucid/restricted Sources
Ign http://archive.ubuntu.com lucid/main Packages
Ign http://archive.ubuntu.com lucid/restricted Packages
Ign http://archive.ubuntu.com lucid/multiverse Sources
Ign http://archive.ubuntu.com lucid/universe Sources
Ign http://archive.ubuntu.com lucid/universe Packages
Ign http://archive.ubuntu.com lucid/multiverse Packages
Ign http://archive.ubuntu.com lucid-updates/main Packages
Ign http://archive.ubuntu.com lucid-updates/restricted Packages
Ign http://archive.ubuntu.com lucid-updates/restricted Sources
Ign http://archive.ubuntu.com lucid-updates/main Sources
Ign http://archive.ubuntu.com lucid-updates/multiverse Sources
Ign http://archive.ubuntu.com lucid-updates/universe Sources
Ign http://archive.ubuntu.com lucid-updates/universe Packages
Ign http://archive.ubuntu.com lucid-updates/multiverse Packages
Ign http://archive.ubuntu.com lucid-security/main Packages
Ign http://archive.ubuntu.com lucid-security/restricted Packages
Ign http://archive.ubuntu.com lucid-security/restricted Sources
Ign http://archive.ubuntu.com lucid-security/main Sources
Ign http://archive.ubuntu.com lucid-security/multiverse Sources
Ign http://archive.ubuntu.com lucid-security/universe Sources
Ign http://archive.ubuntu.com lucid-security/universe Packages
Ign http://archive.ubuntu.com lucid-security/multiverse Packages
Ign http://archive.ubuntu.com lucid/main Sources
Ign http://archive.ubuntu.com lucid/restricted Sources
Ign http://archive.ubuntu.com lucid/main Packages
Ign http://archive.ubuntu.com lucid/restricted Packages
Ign http://archive.ubuntu.com lucid/multiverse Sources
Ign http://archive.ubuntu.com lucid/universe Sources
Ign http://archive.ubuntu.com lucid/universe Packages
Ign http://archive.ubuntu.com lucid/multiverse Packages
Ign http://archive.ubuntu.com lucid-updates/main Packages
Ign http://archive.ubuntu.com lucid-updates/restricted Packages
Ign http://archive.ubuntu.com lucid-updates/restricted Sources
Ign http://archive.ubuntu.com lucid-updates/main Sources
Ign http://archive.ubuntu.com lucid-updates/multiverse Sources
Ign http://archive.ubuntu.com lucid-updates/universe Sources
Ign http://archive.ubuntu.com lucid-updates/universe Packages
Ign http://archive.ubuntu.com lucid-updates/multiverse Packages
Ign http://archive.ubuntu.com lucid-security/main Packages
Ign http://archive.ubuntu.com lucid-security/restricted Packages
Ign http://archive.ubuntu.com lucid-security/restricted Sources
Ign http://archive.ubuntu.com lucid-security/main Sources
Ign http://archive.ubuntu.com lucid-security/multiverse Sources
Ign http://archive.ubuntu.com lucid-security/universe Sources
Ign http://archive.ubuntu.com lucid-security/universe Packages
Ign http://archive.ubuntu.com lucid-security/multiverse Packages
Err http://archive.ubuntu.com lucid/main Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid/restricted Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid/main Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid/restricted Packages
  Connection timed out
Err http://archive.ubuntu.com lucid/multiverse Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid/universe Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid/universe Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid/multiverse Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-updates/main Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-updates/restricted Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-updates/restricted Sources
  Connection timed out
Err http://archive.ubuntu.com lucid-updates/main Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-updates/multiverse Sources
  Connection timed out
Err http://archive.ubuntu.com lucid-updates/universe Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-updates/universe Packages
  Connection timed out
Err http://archive.ubuntu.com lucid-updates/multiverse Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/main Packages
  Connection timed out
Err http://archive.ubuntu.com lucid-security/restricted Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/restricted Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/main Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/multiverse Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/universe Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/universe Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com lucid-security/multiverse Packages
  407 Proxy Authentication Required
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/universe/i18n/Translation-en_IN.bz2 Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/Release.gpg Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/universe/i18n/Translation-en_IN.bz2 Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/Release.gpg Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/restricted/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/main/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/restricted/binary-i386/Packages.gz Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/multiverse/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/universe/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/universe/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid/multiverse/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/main/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/restricted/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/restricted/source/Sources.gz Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/main/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/multiverse/source/Sources.gz Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/universe/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/universe/binary-i386/Packages.gz Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-updates/multiverse/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/main/binary-i386/Packages.gz Connection timed out

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/restricted/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/restricted/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/main/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/multiverse/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/universe/source/Sources.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/universe/binary-i386/Packages.gz 407 Proxy Authentication Required

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/lucid-security/multiverse/binary-i386/Packages.gz 407 Proxy Authentication Required

E: Some index files failed to download, they have been ignored, or old ones used instead.

please help...
thanks
anees

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#17

So you need proxy user and password please put it into row below replace the "proxyusername:proxypassword"
and put it into the

file.

Open a terminal and copy and paste the row below from here to terminal then press enter:

gksudo gedit /etc/apt/apt.conf.d/01proxy

Acquire::http { Proxy "http://proxyusername:<email address hidden>:80"; };

save exit and try...

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get --reinstall install build-essential

Revision history for this message
Mohammad Anees (mdanees20) said :
#18

one more thing, in my proxy password i have one '@' sign. Will that cause any issue???

Revision history for this message
Mohammad Anees (mdanees20) said :
#19

Hey, i changed the proxy password and now its working with above settings.... :) :) :)

Thanks you guys for the help...

Revision history for this message
Mohammad Anees (mdanees20) said :
#20

Thanks marcobra (Marco Braida), that solved my question.

Revision history for this message
faizan (faiz-373) said :
#21

/* write a prog to take the name of the user and output it with a thank you stamement*/
#include<iostream>
using namespace std;
int main()
{
 char ch[20];
 cout<<"enter your name pls"<<endl;
  cin >> ch>>endl;
  cout<<"thank you::"<<ch<<endl;
 return 0;
}

output is::::
ff@ff-desktop:~/CCCP/ch1$ g++ 2.cpp -o 2
2.cpp: In function ‘int main()’:
2.cpp:9: error: no match for ‘operator>>’ in ‘std::operator>> [with _CharT = char, _Traits = std::char_traits<char>](((std::basic_istream<char, std::char_traits<char> >&)(& std::cin)), ((char&)(& ch))) >> std::endl’
/usr/include/c++/4.4/istream:119: note: candidates are: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>& (*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:123: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:130: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:166: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:170: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:173: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:177: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:180: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:184: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:188: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:193: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:197: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:202: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:206: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:210: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:214: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:238: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:741: note: std::basic_istream<_CharT2, _Traits2>& std::operator>>(std::basic_istream<_CharT2, _Traits2>&, _CharT2*) [with _CharT2 = char, _Traits2 = std::char_traits<char>, _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/bits/istream.tcc:853: note: std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&) [with _CharT = char, _Traits = std::char_traits<char>]
ff@ff-desktop:~/CCCP/ch1$

can any1 pls tell me whats wrong???

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#22

Try changing:
#include <iostream>

to:
#include "iostream"

or try:
#include <iostream.h>

or:
#include "iostream.h"

Revision history for this message
faizan (faiz-373) said :
#23

here is the output for the same prog above......when i tried "iostream.h" and <iostream.h>

2.cpp:2:21: error: iostream.h: No such file or directory
2.cpp: In function ‘int main()’:
2.cpp:8: error: ‘cout’ was not declared in this scope
2.cpp:8: error: ‘endl’ was not declared in this scope
2.cpp:9: error: ‘cin’ was not declared in this scope