我想安装Numix图标主题,因此我需要添加ppa,但是奇怪的是出现了此错误:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 163, in <module>
if not sp.add_source_from_shortcut(shortcut, options.enable_source):
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 750, in add_source_from_shortcut
self.set_modified_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 484, in set_modified_sourceslist
self.save_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 650, in save_sourceslist
self.sourceslist.save()
File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 415, in save
files[source.file] = open(source.file, "w")
FileNotFoundError: [Errno 2] Böyle bir dosya ya da dizin yok: '/etc/apt/sources.list.d/numix-ppa-trusty.list'
从代码中,我知道Python想要打开一个配置文件,但是由于找不到它,因此也无法创建它。(管他呢...)
此错误的根源是什么?怎么处理呢?还有,Linux是否将Python用于存储库命令(因为这更有趣)?
我运行了这些代码:
sudo apt-add-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-icon-theme numix-icon-theme-circle
操作系统:Xubuntu 14.04 LTS
编辑:编辑sources.list
每当我运行此代码时,我都会遍历https://launchpad.net/~numix/+archive/ubuntu/ppa链接。所以我在sources.list中尝试了这些:
###############################################
# Number One: Add The Link To The End Of File #
###############################################
deb https://launchpad.net/~numix/+archive/ubuntu/ppa trusty partner
deb-src deb https://launchpad.net/~numix/+archive/ubuntu/ppa trusty partner
# I used "deb", "deb-src" and "trusty partner" patterns to achieve my goal, but it failed.
###################################
# Number Two: Change Link Pattern #
###################################
deb https://launchpad.net/~numix/+archive/ubuntu trusty partner
deb-src deb https://launchpad.net/~numix/+archive/ubuntu trusty partner
# I also tried those since other repository links ends with "ubuntu" instead of "ppa" but this also failed.
/etc/apt/sources.list.d
您的系统似乎缺少该目录(您可以使用确认ls /etc/apt/sources.list.d
,应该显示“没有这样的文件或目录”)。如果确实如此,请使用
sudo mkdir /etc/apt/sources.list.d
然后再试一次。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句