What is a proper way to install Perl modules on CentOS 7?
What is a proper way to install Perl modules on CentOS 7?
Hi there,
I have some Perl modules installed on CentOS 6 and now I'm migrating to CentOS 7. "yum search MODULNAME" return "No matches found". Im not sure which repo should I search. I also don't want any conflicts between repos in the future. There are many ways to install Perl moduls, but what is the proper way? I have nothing super special, all of modules I require are quite old and common.
Please, advice. Althougth I use CentOS for the long time I'm setting it very rare, mostly when moving to the new hardware. Thank you in advance!
I have some Perl modules installed on CentOS 6 and now I'm migrating to CentOS 7. "yum search MODULNAME" return "No matches found". Im not sure which repo should I search. I also don't want any conflicts between repos in the future. There are many ways to install Perl moduls, but what is the proper way? I have nothing super special, all of modules I require are quite old and common.
Please, advice. Althougth I use CentOS for the long time I'm setting it very rare, mostly when moving to the new hardware. Thank you in advance!
Re: What is a proper way to install Perl modules on CentOS 7
Whatever you do, do NOT install via CPAN directly!
"cpanspec" is currently the best of the options IMHO. I have used it exclusively with the Centos7 perl modules I've needed to build. Just "yum install cpanspec" to get the utility and deps. Make sure to setup your .rpmmacros appropriately. There are lots of howto's on setting things up to run cpanspec. It can still be frustrating to need to go through dependency hell sometimes to get perl-wizbang9 installed, however.
Edit: "old and common" should generally mean available from epel, elrepo or similar useful repositories. See https://wiki.centos.org/AdditionalResou ... positories for some clues.
"cpanspec" is currently the best of the options IMHO. I have used it exclusively with the Centos7 perl modules I've needed to build. Just "yum install cpanspec" to get the utility and deps. Make sure to setup your .rpmmacros appropriately. There are lots of howto's on setting things up to run cpanspec. It can still be frustrating to need to go through dependency hell sometimes to get perl-wizbang9 installed, however.
Edit: "old and common" should generally mean available from epel, elrepo or similar useful repositories. See https://wiki.centos.org/AdditionalResou ... positories for some clues.
Re: What is a proper way to install Perl modules on CentOS 7
Also, yum search is not a reliable way to find the packages. Use yum provides instead and use a filename that you know should be in the package that you want to find - e.g yum provides '*/File/Glob.pm'
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: What is a proper way to install Perl modules on CentOS 7
Maybe I'm doing something wrong...
Code: Select all
# yum install cpanspec
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
mysql-connectors-community | 2.5 kB 00:00:00
mysql-tools-community | 2.5 kB 00:00:00
mysql56-community | 2.5 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): extras/7/x86_64/primary_db | 101 kB 00:00:00
(2/3): mysql-tools-community/x86_64/primary_db | 25 kB 00:00:00
(3/3): updates/7/x86_64/primary_db | 3.1 MB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirror.logol.ru
* extras: mirror.logol.ru
* updates: mirror.logol.ru
No package cpanspec available.
Error: Nothing to do
Re: What is a proper way to install Perl modules on CentOS 7
You don't have EPEL installed or enabled. Fedora EPEL is "Extra Packages for Enterprise Linux". You can install it using yum --enablerepo=extras install epel-release
You may also find that useful as EPEL has roughly 800 perl* packages available, already built and ready to go
You may also find that useful as EPEL has roughly 800 perl* packages available, already built and ready to go
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: What is a proper way to install Perl modules on CentOS 7
Thanks for your help, people. I've installed EPEL and cpanspec. Some modules were found and installed, but some still missed. Fore example I need Net::Twitter but here only perl-Net-Twitter-Lite.noarch, which doesn't work for me. Now I'm confused, what to do next?
There are https://wiki.centos.org/AdditionalResou ... positories and https://wiki.centos.org/HowTos/SetupRpmBuildEnvironment - which way should I go?
There are https://wiki.centos.org/AdditionalResou ... positories and https://wiki.centos.org/HowTos/SetupRpmBuildEnvironment - which way should I go?
Re: What is a proper way to install Perl modules on CentOS 7
If no reputable yum repository has the perl packages that you are wanting then you will need to provide them yourself and the best way to do this is by using cpanspec and a program called mock which is in EPEL. Mock will build things in a clean environment so that you do not need to have things like development tools installed by default - mock creates a chroot, installs everything required for the package, builds it and saves it and then you can clean up mock's chroot if disk space is at a premium. Sometimes the spec files emitted by cpanspec need to be edited to add lines like "BuildRequires: perl-some-pther-package" so that mock knows it's required for the build.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: What is a proper way to install Perl modules on CentOS 7
Sometimes yum will not find what you want unless it is specified exactly, as with the version #, etc
I often also use
That allows you to just put in text that is probably part of the name and let it locate the multitude of things that have the string in the name. Then you can yum install the specific one you want. Use some common sense or you can get a rather large list. Just
might take days to go through.
Also note that doesn't give you a list of what might be local but instead it list all from various repositories it knows
Alan D.
I often also use
Code: Select all
yum list all |grep ThingIWantHere
Code: Select all
yum list all | grep perl
Also note that doesn't give you a list of what might be local but instead it list all from various repositories it knows
Alan D.