我是 Linux 新手,经常测试和尝试弄乱我的系统。因此,synaptic 无法启动,因为我必须获取数据包和更新。
这是我收到的错误信息(英语不是我的母语,请理解我的水平)
E: Erreur syntaxique /etc/apt/apt.conf.d/apt-file.conf:17 : valeur suivie de choses illicites
法语翻译过来是:value followed by illicit things
!!哎呀什么是非法物品?我不是强盗。我检查过了etc/apt/apt.conf.d
,这是文件:
# Apt-file configuration file
# Substitutions are made as follows:
# host => remote hostname
# port => remote port
# uri => complete URI from sources.list
# path => path from /
# dist => the distribution name
# cache => path to the local cache dir
# dest => the destination file name inside the cache dir
# cdrom => cdrom mount point
# Where are located Packages
destination = <host>_<path>_dists_<dist>_Contents-<arch>.gz
# common code blocks can be defined as variables and be used as $check_cmd, etc. later
check_cmd = ( ( gunzip -l "<cache>/<dest>_tmp" >/dev/null 2>&1 || (echo "File is not gzipped."; false) ) && mv "<cache>/<dest>_tmp" "<cache>/<dest>" 2>&1 )
error_cmd = ( rm -f "<cache>/<dest>_tmp"; echo "Can't get <uri>/dists/<dist>/Contents-<arch>.gz" )
post_dl_cmd = $check_cmd || $error_cmd
# Fetch methods using diffindex-download:
# -i : ignore missing files
# -q : be quiet
# -n <num> : download full file if more than <num> patches would be necessary
http = diffindex-download -i "<uri>/dists/<dist>/Contents-<arch>.gz" <cache>/<dest>
https = diffindex-download -i "<uri>/dists/<dist>/Contents-<arch>.gz" <cache>/<dest>
ftp = diffindex-download -i "<uri>/dists/<dist>/Contents-<arch>.gz" <cache>/<dest>
# In debtorrent URLs, we have to replace 'debtorrent' by 'http', and we always download the full file
debtorrent = diffindex-download -i -n 0 "http://<host>:<port|9988><path>/dists/<dist>/Contents-<arch>.gz" <cache>/<dest>
ssh = scp -P <port|22> "<user>@<host>:/<path>/dists/<dist>/Contents-<arch>.gz" "<cache>/<dest>_tmp" && $post_dl_cmd
rsh = rcp -l <user> "<host>:/<path>/dists/<dist>/Contents-<arch>.gz" "<cache>/<dest>_tmp" && $post_dl_cmd
file = cp "/<path>/dists/<dist>/Contents-<arch>.gz" "<cache>/<dest>"
copy = cp "/<path>/dists/<dist>/Contents-<arch>.gz" "<cache>/<dest>"
cdrom = echo "Put CDROM labeled <path> in the cdrom device and press [ENTER]" > /dev/stderr ; read DUMMY ; mount "<cdrom>"; cp "<cdrom>/dists/<dist>/Contents-<arch>.gz" "<cache>/<dest>" ; umount "<cdrom>"
# Schemes that might require user input on 'apt-file update'
# These will be skipped if -N is given
interactive = cdrom rsh ssh
这对我来说就像中文一样,自从使用 Linux 以来,我至少重新安装了 10 次 PC,但请保持信心,我不会独自修改此文件。我尽力查找信息,并找到了一个解释,说 Synaptic 似乎覆盖了这个文件(??我不知道),这导致无法更新和升级的情况。这里是此链接:http://www.hyjoo.com/sujet-32191.html
有人知道我正在遭受什么痛苦吗?
答案1
看起来文件apt-file.conf
是在目录中完成的,/etc/apt/apt.conf.d/
而不是在目录中完成的/etc/apt
尝试移动它
sudo mv -i /etc/apt/apt.conf.d/apt-file.conf /etc/apt/
也许最好事先检查一下它是否存在,/etc/apt
然后决定是否要保留它。