Installing a perl module from CPAN on XAMPP for Windows - windows

I'm pretty rusty with Perl and I don't think it's helping that I'm running it in Windows.
I'd like to install this module. I tried the instructions here to install a CPAN module, but it fails trying to install App::cpanminus (the very first step.) I tried just running cpan Config::Simple and it didn't work either. In both situations, it fails with this error message:
Unwrapping had some problem, won't try again without force
Had problems unarchiving. Please build manually
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Does CPAN just not work from the version of Perl that's installed with XAMPP? If so, how do I upgrade it without breaking anything?

manually download and unpack the distro archive
change into the unpacked directory
run cpanm . or cpan .

XAMPP also ships with PPM in C:\xampp\perl\bin\ppm.bat which is often a more Windows friendly way to get modules for perl.
There's a step by step example of using ppm with XAMPP here: http://www.apachefriends.org/f/viewtopic.php?t=26407
Many modules are already installed in C:\xampp\perl\lib and C:\xampp\perl\site\lib

Related

Unable to install Net::LDAP for Strawberry Perl on Windows

I have downloaded and installed Strawberry Perl on a Windows 2012 R2 server to run Bugzilla. I have everything installed and configured fine, and Bugzilla is running, but I have a requirement to use LDAP integration. So I tried to install the Net::LDAP module using perl install-module Net::LDAP, but it fails to install because it needs GSSAPI which requires krb5_config.
After working with the people at Bugzilla, I have installed the MIT Kerberos for Windows with the SDK, and ran perl install-module GSSAPI --shell to get to CPAN. Then I ran look GSSAPI so I could download everything and try making the file, but this is where it is failing. I can't figure out what command to run next. I tried MakeFile.pl --gssapi_inc as well as MakeFile.pl --gssapi_libs, but both give me this error:
run "perl Makefile.PL --help" to see further installation options if options gssapi_libs or gssapi_lddlflags are provided, then gssapi_inc must be as well at C:\STRAWB~1\cpan\build\GSSAPI-0.28-JPLEEE\Makefile.PL line 89.
I am now completely lost as to what I need to do to install the Net::LDAP module.
Note: I am using Strawberry Perl and not ActiveState perl so installing via PPM is not an option.
Second NOTE: I know this might be off topic for Stackoverflow but as it does relate to programming I thought it might fit here, if it is a better fit somewhere else please just flag to move.
Actually, Strawberry Perl does come with the PPM module installed, so you can use ppm to install modules. Personally, I have never used ppm to install modules with Strawberry Perl.
To install a module, you just type 'cpan install [module]'. So for the Net::LDAP module, that command becomes: cpan install Net::LDAP
I just tried to install Net::LDAP using portable Strawberry Perl 5.22.1.2 32-bit on Windows 8 and it installed without any issues.
I do not have the MIT Kerberos installed, but I also tried to install the GSSAPI module and that failed. Part of the output from that attempt showed Linux paths. And the CPAN Testers matrix for that module does not show any tests done on Windows. It's possible that you don't really need to have that module installed and might not be able to install that module on Windows.

Mojolicious on Redhat EC2 instance, can't install due to dependencies?

I spun up a new EC2 instance with Redhat OS. I am trying to install Mojolicious with cpanm Mojolicious but it keeps telling me Can't locate <package> in #INC. The first few times I just did cpanm <package> and then sudo reboot. Then I try to install Mojolicious again but every time it's missing something new and there could be hundreds of these, right? So how do get it to install all the dependencies for Mojolicious?
As an aside, I built a mojolicious app on OSX and I am trying to host it in on EC2. The install was perfect on my Mac.
The system perl provided by RedHat is intentionally crippled (possibly in violation of the Perl license!). The easy fix is to install the perl-core module (to install the core modules of Perl, sigh).
The recommended answer however is to not use the system perl interpreter, leave that to system usage. Instead try perlbrew.

Stand alone package installing for ActivePerl

I have a standard installation of ActivePerl. I need to install the package that is not included to the installation.
Is there any way to install the package without using ppm / CPAN? (it is supposed to be installed as part of other program)
NOTE: It supposed to work under Windows
A Perl package is an ephemeral store of subroutines and package variables in memory. Perhaps you mean a Perl distribution?
First, install cpanm if you don't already have it.
cpan App::cpanminus
Yes, this works on Windows. No, you don't have to install a compiler. cpan will do that for you if necessary.
Then, install the distribution by passing its file name to cpanm. For example,
cpanm IPC-System-Simple-1.21.tar.gz
This will perform the required configuration, install the indicated prerequisites, prepare the distribution's content for installation (e.g. by building any files that need building), run the distribution's tests and install the distribution.

Perl & CPAN upgrade help for OS X

Here is my problem. I am running OS X v10.7 (Lion) and want to set up an old Perl program I have written (was then using a Windows System with ActivePerl and then its ppm).
I read to use CPAN to install Perl modules (I am trying to install the Graph module). Whenever I tried to install it, it failed from a refused connection. Why? So I read that I should run the following to update CPAN and fix any broken links:
cpan> install Bundle:CPAN
cpan> reload cpan
cpan> index cpan
cpan> exit
However, after doing this I am stuck with this every time I try to do a CPAN install or upgrade:
New CPAN.pm version (v1.9800) available.
[Currently running version is v1.9456]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
I was trying to use the default Perl stuff that is included in OS X rather than downloading ActivePerl. How do I fix CPAN and install the Graph Module?
PS: Running install CPAN and reload CPAN didn't do anything, but it generated the same message.
UPDATE
I was able to upgrade to v1.9800 doing a manual install (make, install) through the terminal. But I am still unable to install the Graph Module. Here is what I am getting:
http://cloud.jjnford.com/3D1C1H4217222b1p1O3a
UPDATE - PROBLEM SOLVED
I was finally able to solve the problem. I just moved the /User/jj/.cpan directory to User/jj/.cpan_bak and then reconfigured CPAN and the Graph Module installed with no fuss.
To solve this problem, do a manual upgrade of CPAN (apparently on OS X CPAN has trouble upgrading itself). You can download the source from here. After you have downloaded it uncompress it, create the make file from the Perl script, then run a make test, and finally if all goes well a make install.
$> tar -xvxf CPAN-1.9800
$> cd CPAN-1.9800
$> perl Makefile.PL
$> make
$> make test
$> make install
Now get rid of your old CPAN configuration:
$> mv ~/.cpan ~/.cpan.bak
Now when you run CPAN from the terminal you should be prompted for the configuration again. Once this is complete and CPAN has started you will notice this:
cpan shell -- CPAN exploration and modules installation (v1.9800)
So CPAN is now upgraded and working, and in my case I installed the Graph Module:
$cpan> install Graph
And everything works fine. I hope this helps somebody.
I have a fresh Mac OS X Lion and I updated CPAN without problems.
Installing XCode is not enough. Make, gcc, g++ are not installed by default.
To install them, one has to:
Start XCode, go to XCode->Preferences->Downloads and install component named "Command Line Tools".
I know this was solved, but do consider using "cpanminus" instead next time. It's faster and could save you a lot of hassle. You can either install App:cpanminus using cpanminus (see: App::cpanminus):
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
And then to install any module and its dependencies simply run:
cpanm <module>
Alternatively you could use it directly from the web:
curl -L http://cpanmin.us | perl - --sudo <module>
I use it on my OS X Lion, and it works perfectly :)
Please excuse me for replying to this old post.
I had the same issue as the OP. Once I corrected the command to contain two colons instead of one (i.e. - Bundle::CPAN vs Bundle:CPAN), it worked as expected.

Is there a nice and easy installer for Clojure on Mac OS (Leopard)?

I found the following guide:
http://mark.reid.name/sap/setting-up-clojure.html
but it seems like a whole lot of manual steps, and I bet it is out of date already. Installing ClojureBox on Windows was a breeze. Does anyone know of a simple installer for it? Where can I download it, and what are the steps?
Thanks!
EDIT: Tried installing cake, got:
$ sudo gem install cake
Password:
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
Also tried installing using the script:
$ sudo ./cake_install.rb
http://github.com/ninjudd/cake-standalone/raw/master/jars/cake-0.5.4.jar
[=============================================================================]
http://build.clojure.org/releases/org/clojure/clojure/1.2.0/clojure-1.2.0.jar
[=============================================================================]
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file (ordered_set.clj:1)
EDIT 2: Now the Java version issues :) What version of Java do I need and where to download it?
$ sudo cake test
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file (ordered_set.clj:1)
My Leopard software is up to date :(
Apple Computer supplies their own version of Java. Use the Software Update feature (available on the Apple menu) to check that you have the most up-to-date version of Java for your Mac. If you have problems with downloading, installing or using Java on Mac, please contact Apple Computer Technical Support.
EDIT: Hm ... I suspect that one of the suggestions I tried broke my ability to connect to the internet (both wired as well as wireless) on Apple :(
Clojure is also installable via Homebrew:
http://github.com/mxcl/homebrew
brew install clojure
If you just want to run clojure programs, then macports works. Bear in mind you're dependent upon the maintainer to update versions.
If you plan on writing clojure programs, then cake is a better starting point. Installation involves one of the following (your choice):
Using gem (easiest)
gem install cake
Standalone script
Download the script
Put it somewhere in your path and chmod +x cake to make it executable
Git repository
git clone git://github.com/ninjudd/cake.git
Symlink bin/cake into your path and make it executable
Cake is a full build system, but you can just use it to fire up the repl by running cake repl. There's also leiningen, but starting repls will feel faster in cake since it uses persistent JVMs.
I find Leiningen very easy to use. Just download the script, put it somewhere in your $PATH (/usr/bin/ for example) and make it executable: sudo chmod +x lein.
Now type lein repl and Leiningen will download all the files you need and create a REPL for you. It's that easy.
You may want to check CounterClockWise (an Eclipse plugin). There's a video on how to install it here. It'll give you a lot of features to play with - including a clojure REPL.
Just checked this will still work under Ubuntu. It should be the same for macs, except using whatever macs use instead of apt-get to install maven:
http://www.learningclojure.com/2010/08/clojure-emacs-swank-slime-maven-maven.html
You need to install maven, create a file, then you can just call mvn clojure:repl and everything should just work.
If you'd also like the whole emacs-swank-slime setup that's also easy now, and described there.
If you try it can you comment back here or on the blog to let me know if there are any changes I need to make for macs?
Install MacPorts and then run sudo port install clojure
I once created a package called ClojureX that was partly based on Mark's article. It's not actively maintained anymore (at least not by me), but there's no reason it wouldn't work:
http://github.com/citizen428/ClojureX

Resources