2
votes

I am running Perl 5.16.2 on OSX 10.9.1 and I am having difficulty installing modules from CPAN. I successfully installed

 sudo cpan App::cpanminus

However, when I try something like

 curl -L http://cpanmin.us | perl - --sudo App::cpanminus

I get the error

 Proxy must be specified as absolute URI; ''none'' is not at 
 /loader/0x7fde9483ecd8/App/cpanminus/script.pm line 99.

I've tried resetting the HTTP and FTP proxy variables in the CPAN shell using

 perl -MCPAN -e shell

 cpan[1]>  o conf commit http_proxy=''
 cpan[2]>  o conf commit ftp_proxy='' 

however, the error persists.

Also, when I try to install the following package

 sudo cpanm SGML::Parser::OpenSP

I get the error

 --> Working on SGML::Parser::OpenSP
 Fetching http://www.cpan.org/authors/id/B/BJ/BJOERN/SGML-Parser-OpenSP-0.994.tar.gz ...    OK
 Configuring SGML-Parser-OpenSP-0.994 ... OK
 Building and testing SGML-Parser-OpenSP-0.994 ... FAIL
 ! Installing SGML::Parser::OpenSP failed. 
 See /Users/markclements/.cpanm/work/1392371338.37987/build.log for details. Retry with --force to force install it.

The relevant error is

 OpenSP.xs:26:10: fatal error: 'OpenSP/ParserEventGeneratorKit.h' file not found

UPDATE:

I installed OpenSP using fink and fink installed it in my root directory

 `/sw/include/OpenSP/ParserEventGeneratorKit.h`

The directory sw was created by fink in my root directory. I'm using sudo cpan SGML::Parser::OpenSP but I can't figure out why it can't find this file ParserEventGeneratorKit.h when attempting the build.

Any advice would be greatly appreciated.

Thanks

1
It should be Text::CSV. Case matters. Also, if you installed App::cpanminus without sudo, would it be in root's path?TLP
Hi @TLP, I think I installed it with sudo. How do I check? Sorry, I relatively new to this.Mark Clements
You could try perldoc -l App::cpanminus to see where it is installed. Why are you not using cpan to install Text::CSV if that worked for you?TLP
@TLP the case sensitivity fixed the Text::CSV error. I used sudo cpanm Text::CSV but I still have the other issues. I also added a problem I'm having with the SGML::Parser::OpenSP module.Mark Clements
It failed when building. Are you sure the module is portable to OSX? It may have XS parts which need to be compiled. Did you check the build.log for details like it says?TLP

1 Answers

1
votes

Proxy must be specified as absolute URI; ''none'' is not

please check your http_proxy, ftp_proxy etc environment variables. If you don't have a proxy unset them or set them to '' but don't set them to 'none'.

Building and testing SGML-Parser-OpenSP-0.994 ... FAIL

This module needs a C-compiler and the OpenSP libraries (libosp + header files). Unfortunatly this requirement is not checked inside the modules Makefile.PL so it tries to build and the build fails.