![我想在 Ubuntu 13.04 上安装 Java,但是在安装 Java 时遇到了这种问题](https://linux22.com/image/850884/%E6%88%91%E6%83%B3%E5%9C%A8%20Ubuntu%2013.04%20%E4%B8%8A%E5%AE%89%E8%A3%85%20Java%EF%BC%8C%E4%BD%86%E6%98%AF%E5%9C%A8%E5%AE%89%E8%A3%85%20Java%20%E6%97%B6%E9%81%87%E5%88%B0%E4%BA%86%E8%BF%99%E7%A7%8D%E9%97%AE%E9%A2%98%20.png)
问题是:
apt-get install default-jre
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?
在此之前我已经运行过更新命令,一切正常,但最后我收到了这种类型的消息:
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?
答案1
确保软件中心未运行
ps -e|grep software-center
然后将 sudo 与 apt-get 命令一起使用
sudo apt-get update
sudo apt-get install default-jre