OS X CPAN Perl module installation problem

I'm trying to install a Perl module MediaWiki::API

using CPAN on OS X:

sudo cpan MediaWiki::API                                                        Password:
Reading '/Users/qazwsx/.cpan/Metadata'
  Database was generated on Mon, 13 Jul 2015 20:53:32 GMT
Running install for module 'MediaWiki::API'
Running make for E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Checksum for /Users/qazwsx/.cpan/sources/authors/id/E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz ok
sh: /opt/local/bin/gzip: No such file or directory
Package seems to come without Makefile.PL.
  (The test -f "/Users/qazwsx/.cpan/build/EXOBUZZ-iwzBiH/Makefile.PL" returned false.)
  Writing one on our own (setting NAME to MediaWikiAPI)

  CPAN.pm: Building E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz

Writing Makefile for MediaWikiAPI
Writing MYMETA.yml and MYMETA.json
  EXOBUZZ/MediaWiki-API-0.40.tar.gz
  /usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
No tests defined for MediaWikiAPI extension.
  EXOBUZZ/MediaWiki-API-0.40.tar.gz
  /usr/bin/make test -- OK
Running make install
Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod
  EXOBUZZ/MediaWiki-API-0.40.tar.gz
  /usr/bin/make install  -- OK

      

This is the step of installing Git-Mediawiki (see https://github.com/moy/Git-Mediawiki/wiki/User-manual ). However, after all the installation steps, the first git command reports that the module is MediaWiki::API

not available:

git pull
Can't locate MediaWiki/API.pm in @INC (you may need to install the MediaWiki::API module) (@INC contains: /Users/qazwsx/WorkSpace-X4430/git/perl /Users/qazwsx/WorkSpace-X4430/git/contrib/mw-to-git /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.

      

I wonder if my installation method is correct for the Perl module. One thing that looks odd is a mistake

sh: /opt/local/bin/gzip: No such file or directory

      

I am using Homebrew with standard paths, so the gzip binary is located in / usr / local / bin / gzip. But I don't know where or where to fix it. It seems to be a problem with some of the search paths, but I don't know how to fix it.

+3


source to share


1 answer


There might be something wrong with your ~/.cpan

CPAN configuration. You may try



# Re-install cpan
brew doctor
brew update
brew install cpan

# Remove or back up ~/.cpan
mv ~/.cpan ~/.cpan.bak

# Re-initialize ~/.cpan
cpan config

# Try installing the Perl module again
sudo cpan install MediaWiki::API

      

+1


source







All Articles