I can't install some PERL Modules using CPAN in my droplet

Hi everyone,

I need install some perl modules using cpan on my droplet i get this output on the terminal

install Image::Magick
Reading '/root/.cpan/Metadata'
  Database was generated on Tue, 04 Feb 2020 21:41:03 GMT
Running install for module 'Image::Magick'
Checksum for /root/.cpan/sources/authors/id/J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Use of uninitialized value $newdir in substitution (s///) at /usr/lib/x86_64-linux-gnu/perl/5.26/ line 368.
Use of uninitialized value $newdir in chdir at /usr/lib/x86_64-linux-gnu/perl/5.26/ line 377.
Use of uninitialized value $cwd in concatenation (.) or string at /usr/share/perl/5.26/CPAN/ line 81.
Catching error: "Can't chdir to : No such file or directory at /usr/share/perl/5.26/CPAN/ line 470.\cJ" at /usr/share/perl/5.26/ line 392.
	CPAN::shell() called at /usr/share/perl/5.26/App/ line 414
	App::Cpan::_process_options("App::Cpan") called at /usr/share/perl/5.26/App/ line 511
	App::Cpan::run("App::Cpan") called at /usr/bin/cpan line 13

When i try to find what perl modules are installed on my droplet using this command “instmodsh” i get this output:

cmd? l
Installed modules are:

Maybe you guys can help me to solve this issue. Thanks everyone!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Solved doing this:

curl -L | perl - --sudo App::cpanminus


sudo cpanm Name::Module

Thanks everybody!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up