我正在运行 ubuntu 14.04,在尝试安装 pipelight 以便观看 Netflix 时遇到问题。出了什么问题?这是我正在使用的代码
matt@matt-HP-Pavilion-dv6-Notebook-PC:~$ sudo add-apt-repository ppa:pipelight/stable
More info: https://launchpad.net/~pipelight/+archive/stable
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpwygd9m81/secring.gpg' created
gpg: keyring `/tmp/tmpwygd9m81/pubring.gpg' created
gpg: requesting key 25396B8E from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpwygd9m81/trustdb.gpg: trustdb created
gpg: key 25396B8E: public key "Launchpad PPA for Pipelight Dev Team" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
matt@matt-HP-Pavilion-dv6-Notebook-PC:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
matt@matt-HP-Pavilion-dv6-Notebook-PC:~$ sudo apt-get install --install-recommends pipelight-multi
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pipelight-multi
答案1
看起来 apt 已经在运行,这就是它的意思“无法获取锁 /var/lib/apt/lists/lock”
无法获取包的原因是由于无法获取锁,导致更新失败
我建议重启电脑,这样 apt fill 就会自行清除,然后运行我用来设置电脑和 netflix 的脚本
#!/bin/bash
sudo apt-add-repository -y ppa:pipelight/stable
sudo apt-get update
sudo apt-get install -y pipelight-multi
sudo pipelight-plugin --enable silverlight
sudo apt-get install -y netflix-desktop
如果你仍然无法获得锁,那么也许可以删除锁文件,尽管这是非常值得怀疑的
sudo rm /var/lib/apt/lists/lock