I have ubuntu 12.04 installed on my system alongside Windows 7. I set about installing c++ in ubuntu, but was unable to do so because of my slow internet connection; the software index could not be updated.
Then I went to packages.ubuntu.com from windows and looked up g++ on the website. I downloaded the .deb package along with all the dependencies. I saved them all in the same folder.
Then I started the terminal in ubuntu and changed to the directory where all the packages were saved. Then I typed the following command on my terminal:
sudo dpkg -i g++-4.6_4.6.3-1ubuntu5_amd64.deb gcc-4.6_4.6.3-1ubuntu5_amd64.deb gcc-4.6-base_4.6.3-1ubuntu5_amd64.deb libc6_2.15-0ubuntu10_amd64.deb libgmp10_5.0.2+dfsg-2ubuntu1_amd64.deb libmpc2_0.9-4_amd64.deb libmpfr4_3.1.0-3ubuntu2_amd64.man libstdc++6-4.6-dev_4.6.3-1ubuntu5_amd64.deb zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb gcc-4.6-doc_4.6.3-1ubuntu5_all.deb
I got the following result on my terminal:
(Reading database ... 140686 files and directories currently installed.)
Preparing to replace g++-4.6 4.6.3-1ubuntu5 (using g++-4.6_4.6.3-1ubuntu5_amd64.deb) ...
Unpacking replacement g++-4.6 ...
Preparing to replace gcc-4.6 4.6.3-1ubuntu5 (using gcc-4.6_4.6.3-1ubuntu5_amd64.deb) ...
Unpacking replacement gcc-4.6 ...
Preparing to replace gcc-4.6-base 4.6.3-1ubuntu5 (using gcc-4.6-base_4.6.3-1ubuntu5_amd64.deb) ...
Unpacking replacement gcc-4.6-base ...
Preparing to replace libc6 2.15-0ubuntu10 (using libc6_2.15-0ubuntu10_amd64.deb) ...
Unpacking replacement libc6 ...
Preparing to replace libgmp10 2:5.0.2+dfsg-2ubuntu1 (using libgmp10_5.0.2+dfsg-2ubuntu1_amd64.deb) ...
Unpacking replacement libgmp10 ...
Preparing to replace libmpc2 0.9-4 (using libmpc2_0.9-4_amd64.deb) ...
Unpacking replacement libmpc2 ...
Preparing to replace libmpfr4 3.1.0-3ubuntu2 (using libmpfr4_3.1.0-3ubuntu2_amd64.man) ...
Unpacking replacement libmpfr4 ...
Preparing to replace libstdc++6-4.6-dev 4.6.3-1ubuntu5 (using libstdc++6-4.6-dev_4.6.3-1ubuntu5_amd64.deb) ...
Unpacking replacement libstdc++6-4.6-dev ...
Preparing to replace zlib1g 1:1.2.3.4.dfsg-3ubuntu4 (using zlib1g_1.2.3.4.dfsg-3ubuntu4_amd64.deb) ...
Unpacking replacement zlib1g ...
Preparing to replace gcc-4.6-doc 4.6.3-1ubuntu5 (using gcc-4.6-doc_4.6.3-1ubuntu5_all.deb) ...
Unpacking replacement gcc-4.6-doc ...
Setting up gcc-4.6-base (4.6.3-1ubuntu5) ...
Setting up libc6 (2.15-0ubuntu10) ...
Setting up libgmp10 (2:5.0.2+dfsg-2ubuntu1) ...
Setting up libmpfr4 (3.1.0-3ubuntu2) ...
Setting up zlib1g (1:1.2.3.4.dfsg-3ubuntu4) ...
Setting up gcc-4.6-doc (4.6.3-1ubuntu5) ...
Setting up libmpc2 (0.9-4) ...
Setting up gcc-4.6 (4.6.3-1ubuntu5) ...
Processing triggers for man-db ...
Setting up g++-4.6 (4.6.3-1ubuntu5) ...
Setting up libstdc++6-4.6-dev (4.6.3-1ubuntu5) ...
Processing triggers for install-info ...
Processing triggers for doc-base ...
Processing 3 changed doc-base files...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Everything seemed right until now, but when I tried to compile a c++ program, I got this message:
The program 'g++' can be found in the following packages:
* g++
* pentium-builder
Try: sudo apt-get install <selected package>
What aspects have I overlooked in the installation process? Please help me out.
Thanks in advance.