How to install CPAN without using yum on Linux?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to install CPAN without using yum on Linux?
# 1  
Old 07-08-2015
How to install CPAN without using yum on Linux?

Hi all,

I am on Linux box where CPAN is not working for downloading any perl modules. When I try "perl -MCPAN -e shell" as root as well as a user, I get following error:
Code:
Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN failed--compilation aborted.

So I tried to install CPAN by running "yum install perl-CPAN" but I get following error in response:
Code:
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.

Error Message:
        Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: PYCURL ERROR 56 - "Proxy CONNECT aborted"
Setting up Install Process
No package perl-CPAN available.
Error: Nothing to do

I searched for this error and found that it's result of system (system-id from file /etc/sysconfig/rhn/systemid not present in RHN) not being registered with RHN. The solution suggested there is to re-register the system. Many users have posted that it didn't help them either.
So by the time I get this registration thing cleared, is there any way to install perl-CPAN on my machine without using yum?

Thank you in advance!

---------- Post updated 07-09-15 at 12:24 AM ---------- Previous update was 07-08-15 at 03:00 AM ----------

Update:
I have downloaded the CPAN-2.05.tar.gz
Before I go ahead and install it, can someone please suggest me under which directory I should extract it?
I have root permission and have already posted @INC.

Thanks in advance.
# 2  
Old 07-08-2015
I believe you can extract it to any directory you like. Then you need to run:
1. perl Makefile.PL
2. make
3. make test
4. make install

If you run into errors with these commands (like missing libraries) and don't see any obvious solutions (like a typo) I suggest waiting until your RHN registration is complete as it will most likely be a much simpler solution.
This User Gave Thanks to TioTony For This Post:
# 3  
Old 07-09-2015
Thank you TioTony. I tried it in home directory for root but it gave error that a required perl module for CPAN (CPAN::Meta::Requirements) is missing Smilie

I think I'll just wait until RHN is resolved as trying to get CPAN::Meta::Requirements without CPAN is additional pain.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Installation of virt-manager while yum update and yum install rhvm does not work

I have downloaded RHEV-H 4.2 Red Hat Virtualization - Red Hat Customer Portal (RHVirtualization 4.2 Host and Manager iso). I uploaded the image and installed on an HP G9 server baremetal. I found I dont have a WAN/net connectivity later on HPG9 server. How can I still install virt-manager on... (1 Reply)
Discussion started by: Paras Pandey
1 Replies

2. Programming

How to automatically install all modules required by a script from CPAN?

Having a script.pl how can I automatically download from CPAN all required modules and install and update as required? Something like "emerge -uDNav world" for the perl? ---------- Post updated at 05:38 PM ---------- Previous update was at 05:28 PM ---------- Doesn't matter I've found it ... (6 Replies)
Discussion started by: Tribe
6 Replies

3. Shell Programming and Scripting

Unable to install module using cpan

Hi, I am unable to install module using cpan. It says 407 Proxy Authentication Required I did setup proxy server and given username and password in .bashrc file and apt.conf file. export http_proxy=http://username:password@proxyserver:portno/ However, still unable to install... (1 Reply)
Discussion started by: Anjan1
1 Replies

4. UNIX for Dummies Questions & Answers

Trying to install using YUM

Hi, working on CentOS 5.7 64 bit. I need to install syslog-ng. First I downloaded syslog-ng RPM. When I install I get many dependencies error messages. rpm -ivh syslog-ng-3.3.3-1.mga2.x86_64.rpm warning: syslog-ng-3.3.3-1.mga2.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID... (2 Replies)
Discussion started by: samnyc
2 Replies

5. OS X (Apple)

Unable to install Perl module via CPAN

Hi, I am trying to install Unicode::String from the cpan shell, and here is what I get: Checking if your kit is complete... Looks good Writing Makefile for Unicode::String cp String.pm blib/lib/Unicode/String.pm cp lib/Unicode/CharName.pm blib/lib/Unicode/CharName.pm... (3 Replies)
Discussion started by: psychomachine
3 Replies

6. Red Hat

how can i get the install path from yum?

Hello all i install several application using yum in CentOS now i like to see the installed application path's where each component yum downloaded got installed how can i do that ? (1 Reply)
Discussion started by: umen
1 Replies

7. Shell Programming and Scripting

Error while trying to install from CPAN

Hi i was trying to install Text::CSV from cpan... it seemed to have downloaded everythign properly but was not able to run the make file... do u have any idea as to why this happened?? Install: ============================= If you install Text::CSV_XS v.0.70, it makes Text::CSV faster. ... (5 Replies)
Discussion started by: VGR
5 Replies

8. Shell Programming and Scripting

[Perl] How to install with CPAN specified version of module

Hello all, i am searching how to install a module but the question is : howto specify CPAN to install a determined version of the module ? In my case i want to install DBD:Oracle1.14 and not version 1.23 proposed ! Any idea welcome ! :rolleyes: Thanks ! (1 Reply)
Discussion started by: sun_cracker
1 Replies

9. Linux

install yum

I have a centos 4.x box and for some reason yum is not installed on it. Is there a howto on how to do this? thanks! (3 Replies)
Discussion started by: mcraul
3 Replies

10. UNIX for Dummies Questions & Answers

CYGWIN/CPAN install of Expect.pm

I am attempting to install a Perl Expect module via the CPAN . CPAN goes through the process but nothing happens, sample perl scripts can not find the Expect Module. CPAN was configured via the Default process " Are you ready for manual configuration? " answered "no". CPAN install seemed to find... (1 Reply)
Discussion started by: white222
1 Replies
Login or Register to Ask a Question