Pahomi
Pahomi

Reputation: 465

Perl missing from Raspberry Pi

I have an raspberry-pi already installed and configured for a local application and I need to install other things on. Whatever I try to install, I get the following error:

(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.

It seems that some perl files are corrupted or something. I tried reinstalling perl and I also runned

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

But I get the same error with string terminator in /usr/share/perl/5.20/warnings.pm line 355. Bellow is the code from warnings.pm at the line 355(the last line from file)

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

and so on. Any help it will be much apreciated. If you need some command outputs just ask. Thanks!

Upvotes: 1

Views: 2388

Answers (4)

Ph.D. YG
Ph.D. YG

Reputation: 11

sudo apt-get install perl-modules

can help you.

Upvotes: 1

user151166
user151166

Reputation: 26

What I had to do is to overwrite that file (reinstall did not help me) :

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

Upvotes: 0

Joan Costa
Joan Costa

Reputation: 1

in my case of the same problem it has been necessary:

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

Upvotes: 0

Pahomi
Pahomi

Reputation: 465

What I did to solve the problem and to reinstall the perl and perl-base without reinstalling the os:

I go to /var/cache/apt/archives where I found perl-base_5.20.2-3+deb8u6_armhf.deb and perl_5.20.2-3+deb8u6_armhf.deb then I reinstall them using

sudo dpkg -i perl-base_5.20.2-3+deb8u6_armhf.deb
sudo dpkg -i perl_5.20.2-3+deb8u6_armhf.deb

Pay attention that your versions can be different. If they are not cached you can download them from the mirror manually. Hope it will help someone.

Upvotes: 2

Related Questions