I'm trying to install Bugzilla for demo purposes on my Win8 PC using cygwin. I'm stuck at installing Perl modules, more specifically Params::Validate.
I've tried
install-module.pl Params::Validate
and with cpan:
install Params::Validate
The error message I get is following (in short):
Running Build install
Unable to start 'Build': There is no application associated with the given file name extension.
DROLSKY/Params-Validate-1.13.tar.gz
sudo ./Build install -- NOT OK
Failed during this command:
DROLSKY/Params-Validate-1.13.tar.gz : install NO
The error message is quite simple and clear, but I have absolutely no clue where to find an application which should be associated with the 'Build'-file. Google couldn't help me either. Anyone of you can?
PS. Avast moved some files to quarantine earlier during the installation. I disabled the file monitoring from Avast and re-ran the installation of those modules (at least Module::Runtime) and got response that it went OK.
Download Params-Validate-1.13.tar.gz and extract the contents to a temporary directory. Open the command line in that temporary directory and type:
perl Build.PL
This generates a file called Build. Now to actually build the module run:
./Build
Hopefully you don't get any nasty-sounding error messages. Before installing the module, let's test it works:
./Build test
Hopefully the test suite passes. Now you can install the module. You will need to run this as a user who has write permission over your Perl library directories. (On Linux/Unix machines, that might involve using sudo.) To install the module, run:
./Build install
All done.
Related
I trying to get set up with Variant Effect Predictor (VEP) on the command line. I'm following the setup tutorial but I'm encountering some errors around dependencies. I'm also quite new to the command line so if anyone is able to break down the solution too then I'd be very grateful. Thanks!
Tutorial: https://www.ensembl.org/info/docs/tools/vep/script/vep_tutorial.html
VEP requirements: http://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
I also have Perl v5.32.1.
What I've done:
I installed dependencies (listed in the requirements page) with the following commands:
- sudo -s cpanm DBI
- sudo -s cpanm Archive::Zip
- sudo -s cpanm DBD::mysql
For DBD:mysql, I got the follwoing message:
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ... OK
Configuring DBD-mysql-4.050 ... N/A
! Configure failed for DBD-mysql-4.050. See /root/.cpanm/work/1626111140.5937/build.log for details.
Trying it out anyway, I ran perl INSTALL.pl (from the tutorial page) and got the message below. I would like VEP to run in online mode too if possible.
`WARNING: DBD::mysql module not found. VEP can only run in offline (--offline) mode without DBD::mysql installed
http://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
Hello! This installer is configured to install v104 of the Ensembl API for use by the VEP.
It will not affect any existing installations of the Ensembl API that you may have.
It will also download and install cache files from Ensembl's FTP server.
Checking for installed versions of the Ensembl API...done
Setting up directories
Destination directory ./Bio already exists.
Do you want to overwrite it (if updating VEP this is probably OK) (y/n)? y
- fetching BioPerl
- unpacking ./Bio/tmp/release-1-6-924.zip
ERROR: Unable to unpack file ./Bio/tmp/release-1-6-924.zip without Archive::Extract or tar/unzip/gzip`
You show us this error:
Configure failed for DBD-mysql-4.050. See /root/.cpanm/work/1626111140.5937/build.log for details.
So looking in there will give you more clues about what the problems are. Without that, we can only guess.
But we can make educated guesses. The DBD::mysql distribution comes with a file called DBD::mysql::INSTALL which will talk you through some of the problems you'll find while installing this module.
It's important to note that DBD::mysql is a wrapper around MySQL's client libraries. They are written in C, so you'll need a C compiler installed in order to build DBD::mysql. You'll also need the client libraries and the development versions of the client libraries (for the C header files that you'll need to compile the module). On Ubuntu, those packages are called "libmysqlclient" and "libmysqlclient-dev". If you don't have a C compiler, then you'll want to install "gcc" too.
But this is all getting a bit complicated. There's another, simpler, approach. If you're using the system version of Perl (the version that was installed as part of the operating system and probably lives in /usr/bin/perl) then I'd recommend using the pre-build Ubuntu version of the package, which you can install by running:
$ sudo apt-get install libdbd-mysql-perl
Installing that version uses the OS's own package manager, and the package manager knows which other packages are needed in order for it to work - so it will install those as well.
People will probably complain that you're better off installing the modules from CPAN as it gives you more flexibility and allows you to use more up-to-date packages than the versions from your OS repos. And they're right. But, honestly, if you're a non-Perl programmer who just wants to get an application up and running, this is by far the simplest approach.
(But, as I said above, this is all guesswork as you haven't shared the most important errors with us.)
I am trying to install some missing Perl modules because when I run my Perl script I am getting the error:
Can't locate Net/SFTP.pm in #INC (you may need to install the Net::SFTP module)
The first step I have taken to install this is:
I have brought up CPAN in CMD and run the command cpan> install foo but no luck because after I run the command I am getting:
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
I am on a proxy so I am wondering if there is a way round the proxy?
Another step I have taken is that I have installed strawberry Perl from http://strawberryperl.com/ but still no luck.
Lastly, I have the file 01mailrc.txt.gz locally install in my download folder but not sure how to install it.
FYI: I am on Windows. I have not used Perl before. The Perl version I use is:
This is Perl 5, version 26, subversion 1 (v5.26.1) built for MSWin32-x64-multi-thread
Could someone help me on this or show me a way around on how to install it?
I've already read related threads like these, but they do not fully capture our situation.
This is on a firewalled machine. No net access. We can ftp files to folders and install modules from there.
We have CHMOD 777 for our users on some folders. We can install Perl modules if we locally build them by downloading the relevant .pm files. But when these files cannot install, we do not have any cpan or cpanm.
I'd like to install, for example, HTML::Restrict. If I do the download + install thing, the Restrict.pm gives me this error:
/lib/HTML/Restrict.PM:328: Unknown command paragraph "=encoding UTF-8"
Reading a bit online suggests that this could be an old Perl problem. We use 5.8.x. Our own dev machines have the luxury of 5.16.x and internet access so installing module is a cinch. Anyway, one of my older machines also has 5.8.x, and installing the module via cpanminus worked there (with internet).
So, question: is it possible to install "cpanminus" (cpanm) through FTP, then upload specific module files to the server through FTP too, and then go into shell and install modules via cpanm by pointing it to respective .pm files?
Thank you for any pointers.
You should take a look at perldoc perlmodinstall which goes into detail about how to install a module from its distribution. It follows what should be a familiar incantation
Decompress
Unpack
Build
Test
Install
Assuming you're on a Linux system, this commonly takes take the form of
gzip -d My-Module-Distribution.tar.gz
tar -xof My-Module-Distribution.tar
perl Makefile.PL
make
make test
make install
But after the Unpack stage you will often find a README file or other text file that will describe any unusual steps to be taken
Clearly some of these steps can be combined. For instance, most people will probably want to use
tar -xvfz My-Module-Distribution.tar.gz
to avoid having to invoke gzip separately. Likewise, the make system will force a build phase as a prerequisite if you use just
make test
without the preceding make
The linked document has a lot to say about how to install on other platforms, should you not be running a Linux variant
I still don't really understand your thinking, but you can get a stand-alone version of cpanm using curl. For instance
curl -sS --location https://cpanmin.us/ --output cpanm
then you should be able to just copy it to your target machine, put it on your PATH, and do
cpanm HTML-Restrict-2.2.2.tar.gz
but I doubt if you will find any change to the specific errors you are getting
I keep getting error messages when trying to install the Date::Manip module. Any Perl experts know what I can try?
The command I'm trying is
perl -MCPAN -e "install Date::Manip"
Perl version is 5.20 and the version of the Date::Manip it keeps trying to install is 6.45, but it comes back with "Make had some problems" and "No such file in archive". It does prompt me to manually install the file, but i have no clue on how to do that. Here's what it says...
Could not find file 'sulbeck#heather.osg.ufl.edu.2024:1399465428' in memory at C:\Strawberry\perl\lib/CPAN/Tarzip.pm line 408.
Making symbolic link 'C:\STRAWB~1\cpan\build\tmp-3576\Date-Manip6.45\lib\Date\Manip\.#Changes6.pod' to 'sulbeck#heather.osg.ufl.edu.2024:1399465428' failed at C:\Strawberry\perl\lib/CPAN/Tarzip.pm line 408.
Could not untar with Archive::Tar SBECK/Date-Manip-6.45.tar.gz
Had problems unarchiving. please build manually. Stopping: 'install' failed for 'Date:Manip
I had exactly the same problem today.
I've been able to get 6.44 installed by doing the following from within the cpan cli (you can access this by simply typing cpan in your terminal).
The developer for Date::Manip has archived previous versions of the module, you'll need to add the backpan URL into your cpan config so you can search for it.
o conf urllist push http://backpan.perl.org/
Now you should be able to install using a direct path to version 6.44
install SBECK/Date-Manip-6.44.tar.gz
I had to accept that the checksum wasn't present in the package, but after that the module seemed to install correctly.
I suspect you'll want to keep an eye on the module and this bug report so that you can upgrade once it has been fixed.
perl -MCPAN -e "install 'SBECK/Date-Manip-6.44.tar.gz'"
or wait until the distribution is fixed. '.#Changes6.pod' is an illegal filename for your tar.
I'm working in ClearOS5.3, with rpm 4.4 installed. I'm using rpm to distribute a module I created, however the %post script in my spec file isn't executed when I install the package.
I'm using the command rpmbuild -ba mypackage.spec
to build the rpm, and the command rpm -ivh mypackage-version-release.rpm to install the package.
Installation is performed manually (not using make) in the %install script. All the files seem to be installed in the correct places, however none of the install scripts run (specifically %post and %preun, in the case of my package). Testing with other install scripts (%pre) showed those sections didn't work either.
From what I can tell based on installing the package in debug mode, the %pretrans and %posttrans scripts are run. Additionally, when building the package, it recognizes the the install scripts and lists their dependencies (/bin/sh).
Does anyone have an idea as to why these install scripts might not be running and have suggestions to fix the issue?