Upgrading Perl in Ubuntu [closed] - perl

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Since May 14th the current version of Perl is 5.14. In Ubuntu repository the current version of Perl is 5.10 which is no longer supported. So Im trying to manually upgrading Perl.
What is the recommended way to upgrade perl 5.10 to perl 5.14 in Ubuntu?
I found the perlbrew tool, but it seems to install just in the users home.

Perlbrew docs says that you can change your $HOME dir to something else:
The directory ~/perl5/perlbrew will contain all install perl
executables, libraries, documentations, lib, site_libs. If you need to
install perlbrew, and the perls it brews, into somewhere else because,
say, your HOME has limited quota, you can do that by setting a
PERLBREW_ROOT environment variable before running the installer:
export PERLBREW_ROOT=/opt/perlbrew curl -L
http://xrl.us/perlbrewinstall | bash

download, configure, compile ....

Related

Which of /usr/bin/perl or /usr/local/bin/perl should be used? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
If I have both /usr/bin/perl and /usr/local/bin/perl available on a system, which one should I use?
This question is unanswerable cleanly, without more informations and like - so only few remarks.
are you sure than you have two perls? The one could be an symbolic link to the another, for example the /usr/bin/perl -> /usr/local/bin/perl.
if they're aren't symlinked
the /usr/bin/perl is probably the system-wide perl, which comes with your basic system installation
and the /usr/local/bin/perl is installed by some package-management
just try:
/usr/bin/perl -V
and /usr/local/bin/perl -V
if they're different versions - someone installed to your system one additional perl
also, you could try which one is executed when you type perl - e.g. which one is first in your path. type perl could help. Or the simple perl -V.
Which one you should to use? Probably the package installed one, because your package-manager will install the CPAN-modules to the right location. Isn't possible to tell, which one it is. But this depends on your system's package management.
If you doubt, just install your own perl. I recommending to you
check the anyenv - here: https://github.com/riywo/anyenv
after installing the anyenv you could install the plenv (you could install plenv without anyenv too - but anyenv could help you with other interpreters too in the future)
install plenv with anyenv install plenv
after you got installed the plenv, you could install any perl version what is available and which one you want, using the:
plenv install 5.16.2 #or similar command
read about the plenv here: https://github.com/tokuhirom/plenv
You will get your own perl, and could install any CPAN module without the risk overriding your system perl modules. Also, you don't need to be admin. Simple, nice and clean.

Not able to install DBD::pg perl module [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am trying to install DBD::pg module on my linux ubuntu 12.04 machine but not able to do so. I am using download method as I am facing connectivity issues while installing it from CPAN terminal. when I run perl Makefile.PL it gives me following.
Configuring DBD::Pg 3.4.2
Path to pg_config? /vol01/local/rina/cac/softwares/pgsql
Enter a valid PostgreSQL postgres major version number 8
Enter a valid PostgreSQL postgres minor version number 8
Enter a valid PostgreSQL postgres patch version number 8
Enter a valid PostgreSQL postgres bin dir /vol01/local/rina/cac/softwares/bin
Enter a valid PostgreSQL postgres include dir /vol01/local/rina/cac/softwares/pg_inc
I have no idea what to put in the above questions still I created few directories manually and provided as above.
then it gives me this
PostgreSQL version: 80898 (default port: 5432)
POSTGRES_HOME: (not set)
POSTPGRES_INCLUDE: /vol01/local/rina/cac/softwares/pg_inc
POSTGRES_LIB: /usr/local/pgsql/lib -lssl -lcrypto
OS: linux
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 182
Warning: prerequisite Time::HiRes 0 not found.
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 285
Using DBI 1.631 (for perl 5.010001 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/
Writing Makefile for DBD::Pg
later when I run make it gives me below error multiple times
Pg.xs:301: error: ‘imp_dbh_t’ has no member named ‘sqlstate
How can I install this module successfully? I found few similar kind of questions but could not find the solution. Please help.
Solved in the comments by Geetika:
I did it on centOS machine...I ran "yum install postgresql-devel" and then installed the module successfully...thanks a lot for your time and help... :)

How to use downloaded Net::SSH2 module in Perl? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
I have downloaded Net-SSH2-0.43 to be able to use Net::SSH2 Perl module. But I don't know what I need to do after that, just include paths or something else. Please help.
you could use perlbrew to install Perl in your home or in any directories wo. root rights: http://perlbrew.pl/
wget -O - http://install.perlbrew.pl | bash
perlbrew install perl-5.16.0
perlbrew switch perl-5.16.0
you could call your perl from shell (scripts) like this: http://perlbrew.pl/Perlbrew-In-Shell-Scripts.html
If your servers are identical enough then you could rsync/rdist this directory to every host and you are done.

Cygwin wants to downgrade my Perl [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm using Cygwin 2.769. I used setup.exe to upgrade Perl to version 5.14.1-2, which works fine. But now whenever I open setup.exe to upgrade/install some other package, it by default wants to downgrade Perl back to 5.10.1-5. If I don't remember to manually cycle that box over to my current version each time, Perl gets downgraded without my noticing.
Is this expected behavior, or have I hosed something up? It seems like using the "Curr" setting should not by default downgrade things.
I've had this problem, and it's made package managers almost unbearable. When disparate packages want to rely on different versions of a package that can only install in one version at a time, bad things happen.
Don't use the system perl for anything. Install a perl that other packages don't care about.

What's the difference between rpm and yum? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Is there any difference between rpm and yum? I know the recent system prefer yum, but want to know if there is need for rpm also.
to expand on the Udo's answer, there is the program, "rpm", which manipulates specifically the packages it is asked to manipulate, and there is "yum", which is a more intelligent management system that can find dependencies and download .rpm files even if they're not in the system.
with the "rpm" command, you need to know the exact location of the .rpm package, but with "yum", you just need to know the name of it, and as long as it's available through your repositories list, it will be installed along with its dependencies
Yum is a package manager and rpms are the actual packages.
With yum you can add or remove software. The software itself comes within a rpm.
The package manager allows you to install the software from hosted repositories and it will usually install dependencies as well.