Raspberry Pi 中缺少 Perl

问题描述 投票:0回答:4

我已经为本地应用程序安装并配置了树莓派,我需要安装其他东西。无论我尝试安装什么,都会收到以下错误:

(Can't find string terminator '"' anywhere before EOF at     /usr/share/perl/5.20/warnings.pm line 355.
Compilation failed in require at /usr/share/perl/5.20/Carp.pm line 5.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/Carp.pm line 5.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 8.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 8.
Compilation failed in require at /usr/share/perl/5.20/FileHandle.pm line 9.

好像有些perl文件损坏了或者什么的。我尝试重新安装 perl 并且我也运行了

sudo dpkg-reconfigure perl
sudo apt-get --reinstall install perl-base

但是我在 /usr/share/perl/5.20/warnings.pm 第 355 行中遇到了与字符串终止符相同的错误。下面是 warnings.pm 第 355 行的代码(文件的最后一行)

Croaker("package '$category' not registered for
NUL NUL NUL NUL NUL 

等等。任何帮助将不胜感激。如果您需要一些命令输出,请询问。谢谢!

perl raspberry-pi
4个回答
2
投票

我做了什么来解决问题并重新安装 perl 和 perl-base 而无需重新安装操作系统:

我转到 /var/cache/apt/archives ,在那里找到了 perl-base_5.20.2-3+deb8u6_armhf.deb 和 perl_5.20.2-3+deb8u6_armhf.deb 然后我使用

重新安装它们
sudo dpkg -i perl-base_5.20.2-3+deb8u6_armhf.deb
sudo dpkg -i perl_5.20.2-3+deb8u6_armhf.deb

请注意,您的版本可能会有所不同。如果它们没有缓存,您可以从镜像手动下载它们。希望它能帮助别人。


1
投票

sudo apt-get install perl-modules

可以帮助你。


0
投票

在我遇到同样问题的情况下,这是必要的:

cd /var/cache/apt/archives
sudo dpkg -i perl-base_5.24.1-3+deb9u4_armhf.deb
sudo dpkg -i perl_5.24.1-3+deb9u4_armhf.deb
sudo dpkg -i perl-modules-5.24_5.24.1-3+deb9u4_all.deb

0
投票

我要做的就是覆盖该文件(重新安装对我没有帮助):

cp /usr/lib/arm-linux-gnueabihf/perl-base/auto/re/re.so /usr/lib/arm-linux-gnueabihf/perl/5.24.1/auto/re/re.so
© www.soinside.com 2019 - 2024. All rights reserved.