当我播放在线视频时,它们经常被多次闪烁和其他干扰所打断。很多时候我都看到一条错误消息,说 Flash 播放器崩溃了。当我尝试在命令行上安装 Flash 插件时,显示了此错误。有人能帮我摆脱这个冲突吗?
$ sudo apt-get install flashplugin-installer
[sudo] password for agha:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a'
to correct the problem
以下是完整日志:
Ign http://in.archive.ubunutu.com trusty-updates/restricted Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-updates/universe Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/main Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/multiverse Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/restricted Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/universe Translation-en_IN
Fetched 964 kB in 42s (22.4 kB/s)
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?
agha@agha-GA-78LMT-USB3:~$ sudo apt-get install wine1.7 winetricks
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?
agha@agha-GA-78LMT-USB3:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
agha@agha-GA-78LMT-USB3:~$ sudo apt-get install -f
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
以下方法对我有用!我试图安装无线驱动程序时出现了此错误。不得不删除文件和锁定文件。
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
cd /var/lib/dpkg/updates
sudo rm *
sudo apt-get update
然后你可以运行apt-get install
你想要安装的任何包
答案2
运行sudo dpkg --configure -a
它应该能够自我纠正。
要不然
sudo apt-get install -f
(修复损坏的包)然后尝试sudo dpkg --configure -a
再次运行。
您可以通过以下链接了解如何在 Ubuntu 中安装 Flash Player
http://www.wikihow.com/Install-Flash-Player-on-Ubuntu
更新答案:
dpkg 已被锁定,请尝试以下解决方案并按照上述(链接)步骤安装 flash 播放器。