LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Automatically install perl dependencies? (http://www.linuxquestions.org/questions/linux-software-2/automatically-install-perl-dependencies-660847/)

ewolf 08-06-2008 07:17 AM

Automatically install perl dependencies?
 
Hello,

I recently installed Video::Capture::V4l using apt from Debian's repositories.

I then downloaded the Video::Capture::V4l::Imager tarball from CPAN.

I've unpacked the tarball, cd'd into the directory, and ran:
Code:

perl Makefile.PL
at which point I receive:

Code:

Warning: prerequisite Imager 0.49 not found.
Warning: prerequisite Inline::C 0.44 not found.
Warning: prerequisite Log::Log4perl 1.06 not found.
Warning: prerequisite Video::Capture::V4l 0.9 not found.
Writing Makefile for Video::Capture::V4l::Imager

Would anyone be so kind as to share the switch for automatically downloading and installing prerequisites from CPAN?

I've tried googling without much luck. And 'man perl' doesn't seem like the right place to find this.

Thank you.

matthewg42 08-06-2008 09:04 AM

Debian has a package for that Perl module, so I expect any dependencies which it has will also be in the Debian repositories.

Use aptitude and install the package libvideo-capture-v4l-perl:

Code:

sudo aptitude install libvideo-capture-v4l-perl
For other modules which do not have Debian packages, you might want to use the CPAN interactive system. See the cpan manual page for more information. IIRC, CPAN does include the ability to recursively download dependencies within the CPAN sources.

ewolf 08-06-2008 09:26 AM

Hello, thank you for your response.

Quote:

Originally Posted by matthewg42 (Post 3238690)
Use aptitude and install the package libvideo-capture-v4l-perl:

I have that installed already. I am trying to install from CPAN what would be the equivalent of 'libvideo-capture-v4l-imager-perl' which isn't a package in the Debian repositories. So I downloaded the tarball from CPAN, unpacked it, and tried to install it. I ran into dependency issues.

I was just wondering, for future reference, if there was a way to install CPAN packages and have dependencies installed automatically, without more than some initial interaction, like apt does.

Thanks!

ne pas 08-06-2008 09:43 AM

Use the CPAN shell to install perl modules from CPAN, it will do (nearly) all of the dependencies checking and resolving:
Code:

$ sudo perl -MCPAN -e shell

cpan>install Video::Capture::V4l::Imager

see CPAN-Module's perldoc for more instructions
Code:

$ perldoc CPAN

fotoguy 08-07-2008 08:38 PM

This is straight from the perlsdocs, it will install all dependencies without any interaction

Code:

PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install Video::Capture::V4l::Imager'

Mr. C. 08-08-2008 12:44 AM

Be very careful when mixing package-based perl modules with CPAN modules. This can lead to mysterious module load failures, difficult for inexperienced users to diagnose and resolve.

dnyaneshwari.chandarana 12-03-2010 03:46 PM

Hi the two commands worked for me but at the end it gave me following things

Running make install
make test had returned bad status, won't install without force
Failed during this command:
DARREN/Tie-Google-0.03.tar.gz : make_test NO
ASCOPE/Net-Google-1.0.tar.gz : make_test NO

What should i do?

Any help shall be appericiated.

Thanks

fotoguy 12-04-2010 02:24 AM

Did you run the commnad as root, you need root privileges to install, also make sure you update cpan itself to the latest version before updating any other cpan packages.


All times are GMT -5. The time now is 03:44 AM.