运行 shutter 和 apt 时出现语法错误。怀疑与 perl 有关

运行 shutter 和 apt 时出现语法错误。怀疑与 perl 有关

我在运行一些其他程序时遇到了非常奇怪的错误apt。我认为这可能与有关perl

我在尝试运行快门时发现了问题:

$ 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 告诉我这两个字符串实际上都不在提到的文件中,所以我有点茫然。

谢谢你的时间。

相关内容