While trying to compile a program with the following command:
g++ -o <output_file> <my_file.cpp>
I found the following report....
The program 'g++' can be found in the following packages:
* g++
* pentium-builder
Try: sudo apt-get install <selected package>
Then I tried...
nawshad@ubuntu:~/Thesis/Codes/Thesis_Utility_Function/Test Codes$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
g++ : Depends: g++-4.6 (>= 4.6.3-1~) but it is not going to be installed
libqt4-opengl : Depends: libqtcore4 (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
Depends: libqtgui4 (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
libqt4-svg : Depends: libqtcore4 (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
Depends: libqtgui4 (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I can't install due to unmet dependencies.
While updating, the following error occurs:
nawshad@ubuntu:~$ sudo apt-get update
[sudo] password for nawshad:
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
I followed the instructions at Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?), but the unmet dependencies are still not resolved.
sudo apt-get install -f
– Web-E Aug 14 '12 at 04:47g++
at all, suggestingg++
may be being interpreted as a pattern byapt-get
(which happens when the package manager doesn't know about the existence of a package calledg++
due to repositories being disabled). – Eliah Kagan Sep 09 '14 at 19:56