尝试使用时出现此错误apt-get:
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?
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
我正在按照这些说明在我的笔记本电脑上安装 git。
当我做:
$ sudo apt-get install git-core
这是我的终端显示的内容:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libasprintf0c2:i386
libcroco3:i386
libgettextpo0:i386
libgomp1:i386
libunistring0:i386
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
git git-man liberror-perl
Suggested packages:
git-daemon-run
git-daemon-sysvinit
git-doc git-el
git-arch git-cvs
git-svn
git-email
git-gui
gitk gitweb
The following NEW packages will be installed:
git git-core git-man liberror-perl
0 upgraded, …Run Code Online (Sandbox Code Playgroud) 尝试使用以下命令编译程序时:
g++ -o <output_file> <my_file.cpp>
我发现了以下报告......
The program 'g++' can be found in the following packages:
* g++
* pentium-builder
Try: sudo apt-get install <selected package>
Run Code Online (Sandbox Code Playgroud)
然后我试了...
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 (= …Run Code Online (Sandbox Code Playgroud)