How to install Perl modules

Mine i.cue at dsl.pipex.com
Mon Sep 14 06:33:42 PDT 2009


Hi Ryan,

Thanks for the help.

I have encountered an error when I tried to install  p5-libwww-perl.

Error: Target org.macports.activate returned: Image error: /opt/local/ 
lib/perl5/vendor_perl/5.8.8/IO/Compress/Adapter/Deflate.pm is being  
used by the active p5-io-compress-zlib port.  Please deactivate this  
port first, or use 'port -f activate p5-io-compress' to force the  
activation.
Error: The following dependencies failed to build: p5-io-compress p5-uri
Error: Status 1 encountered during processing.

I tried port -f activate p5-io-compress and tried again but that also  
gave an error
Error: The following dependencies failed to build: p5-io-compress

Do I need to uninstall p5-io-compress

Thanks,

Terrence


On 14 Sep 2009, at 11:41, Ryan Schmidt wrote:

> On Sep 14, 2009, at 05:17, Mine wrote:
>
>> I am trying to run a Perl app called get_iplayer (http:// 
>> linuxcentre.net/getiplayer/) on OSX 10.4.11.
>> I have been told the the following modules are required:
>>
>> Built-ins:
>>
>> use Fcntl
>> use File::Copy
>> use File::Path
>> use File::stat
>> use Getopt::Long
>> use IO::File
>> use IO::Handle
>> use IO::Seekable
>> use IO::Socket
>> use POSIX
>> use POSIX
>> use Socket
>> use Time::Local
>>
>> Ones that aren't in core AFAIK:
>>
>> use CGI
>> use CGI::Cookie
>> use HTML::Entities
>> use HTTP::Cookies
>> use HTTP::Headers
>> use IPC::Open3
>> use LWP::ConnCache
>> use LWP::UserAgent
>> use URI
>> use URI::Escape
>>
>> I think the first set are part of the standard Perl 5 install, but  
>> the second group are options
>> which can be added as required.
>>
>> Can someone please tell me if it is possible to install these  
>> modules using MacPorts.
>> I have searched the available Ports and found p5-cgi, and have  
>> found a few html
>> files, but I am not sure which of these files contain the modules  
>> I need, or how to find
>> the others.
>
> There isn't a way in MacPorts to know what a port installs until  
> after you've installed it, so that's not helpful for figuring out  
> what port you need to install. For Perl modules, I would suggest  
> searching the CPAN web site for the module in question, and it  
> should tell you what package you need to install to get it. To  
> convert a CPAN package name to a MacPorts port name, convert  
> uppercase to lowercase letters, replace "::" with "-" and prepend  
> "p5-".
>
> According to "port contents p5-cgi" (after running "sudo port  
> install p5-cgi") it installs both CGI and CGI::Cookie (and others).
>
> According to a search on cpan.org, HTML::Entities is in the  
> HTML::Parser package, which is the p5-html-parser port.
>
> http://search.cpan.org/search?query=HTML%3A%3AEntities&mode=all
>
> HTTP::Cookies, HTTP::Headers, LWP::ConnCache and LWP::UserAgent are  
> all in p5-libwww-perl.
>
> http://search.cpan.org/search?query=HTTP%3A%3ACookies&mode=all
>
> URI and URI::Escape are in p5-uri.
>
> http://search.cpan.org/search?query=URI%3A%3AEscape&mode=all
>
>> I have found the files on CPAN but I am not sure how to do a  
>> manual install into the
>> opt/ location required by MacPorts.
>
> Please don't use CPAN to manually install files into MacPorts-owned  
> directories; this will confuse MacPorts and prevent it from being  
> able to manage your dependencies properly. Instead, use MacPorts to  
> install these modules. If the modules you need don't exist, file  
> requests for them, or better yet, make the ports and submit them.  
> The cpan2port script makes it very easy to make ports for CPAN  
> modules.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090914/7d5b0fd1/attachment.html>


More information about the macports-users mailing list