Question

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/Cwd.pm line 368.
Use of uninitialized value $newdir in chdir at /usr/lib/x86_64-linux-gnu/perl/5.26/Cwd.pm line 377.
Use of uninitialized value $cwd in concatenation (.) or string at /usr/share/perl/5.26/CPAN/CacheMgr.pm line 81.
Catching error: "Can't chdir to : No such file or directory at /usr/share/perl/5.26/CPAN/Distribution.pm line 470.\cJ" at /usr/share/perl/5.26/CPAN.pm line 392.
	CPAN::shell() called at /usr/share/perl/5.26/App/Cpan.pm line 414
	App::Cpan::_process_options("App::Cpan") called at /usr/share/perl/5.26/App/Cpan.pm 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:
   Perl
cmd?

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 http://cpanmin.us | perl - --sudo App::cpanminus

then

sudo cpanm Name::Module

Thanks everybody!

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.