Я получаю действительно странную ошибку при запуске apt
и некоторых других программ. Я думаю, что это может иметь какое-то отношение к perl
.
Я обнаружил проблему, пытаясь запустить shutter:
$ shutter
syntax error at /usr/bin/shutter line 0, near "$!;"
syntax error at /usr/bin/shutter line 0, near "q/etc/perl/sitecustomize.pl}"
BEGIN not safe after errors--compilation aborted at /usr/bin/shutter line 29.
Я думал, что проблема была с Shutter, но когда я попытался запустить apt upgrade
, чтобы обновить его, я получил те же ошибки (но это время в различных dpkg
сценариях):
$ sudo apt upgrade
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:
linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic
linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
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
syntax error at /usr/sbin/dpkg-preconfigure line 0, near "$!;"
syntax error at /usr/sbin/dpkg-preconfigure line 0, near "q/etc/perl/sitecustomize.pl}"
syntax error at /usr/sbin/dpkg-preconfigure line 17, near "}"
(Might be a runaway multi-line {} string starting on line 7)
syntax error at /usr/sbin/dpkg-preconfigure line 18, near "$@) "
syntax error at /usr/sbin/dpkg-preconfigure line 20, near "0;"
syntax error at /usr/sbin/dpkg-preconfigure line 30, near "0;"
Execution of /usr/sbin/dpkg-preconfigure aborted due to compilation errors.
Setting up mime-support (3.60ubuntu1) ...
syntax error at /usr/sbin/update-mime line 0, near "$!;"
syntax error at /usr/sbin/update-mime line 0, near "q/etc/perl/sitecustomize.pl}"
syntax error at /usr/sbin/update-mime line 15, near "022)"
syntax error at /usr/sbin/update-mime line 22, near "0;"
Execution of /usr/sbin/update-mime aborted due to compilation errors.
dpkg: error processing package mime-support (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
mime-support
E: Sub-process /usr/bin/dpkg returned an error code (1)
Поиск syntax error near "$!;"
и syntax error near "q/etc/perl/sitecustomize.pl}"
пока ничего не дал. Я на Ubuntu 17.04.
Grep говорит мне, что ни одна из этих строк на самом деле отсутствует в упомянутых файлах, поэтому я немного растерялся.
Спасибо за ваше время.