每当我尝试安装任何软件包时,都会出现以下错误(操作系统为 ubuntu 14.04)。
anil@anil-HP-15-Notebook-PC:~$ sudo apt-get upgrade
[sudo] password for anil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libpcap0.8:i386 wine-gecko2.24 wine-gecko2.24:i386 wine-mono4.5.2
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up getdeb-repository (0.1-1~getdeb1) ...
/var/lib/dpkg/info/getdeb-repository.postinst: 15: /var/lib/dpkg/info/getdeb-repository.postinst: cannot create /etc/apt/sources.list.d/getdeb.list: Directory nonexistent
dpkg: error processing package getdeb-repository (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
getdeb-repository
E: Sub-process /usr/bin/dpkg returned an error code (1)
anil@anil-HP-15-Notebook-PC:~$
答案1
看来该/etc/apt/sources.list.d
文件夹在系统中不存在。
使用以下命令检查文件夹是否存在:
ls /etc/apt/sources.list.d
如果缺失,请尝试:
sudo mkdir /etc/apt/sources.list.d
并重做apt-get
命令。