centOS: error: Socket.pm is older than 2.006 - centos

Yesterday I installed centOS in my vmware to run rancid.
According to this site:
I did step by step but when I came to command:
./configure --prefix=/usr/local/rancid/
the error was found:
checking Socket.pm version... Socket version 2.006 required--this is only version 1.78 at -e line 1. BEGIN failed--compilation aborted at
-e line 1. configure: error: Socket.pm is older than 2.006; upgrade from http://metacpan.org/pod/Socket
so i can not continue, can you help me?

Try to call
cpanm Socket
from your shell. This will install the latest version of Socket

Related

'Make test' fails on installing older version of Perl (5.18.4)

Error in building:
"EISDIR" is not exported by the Errno module
Can't continue after import errors at run/switches.t line 17.
BEGIN failed--compilation aborted at run/switches.t line 17.
FAILED--no leader found
Exit error:
ext/Errno/t/Errno ............................................. FAILED--Further testing stopped: No errno's are exported
make: *** [makefile:872: test] Error 29
I am attempting to install an older version of perl as I require it for the installation of a LAMP Stack that has not been updated for a while.
I am following the instructions here:
https://help.dreamhost.com/hc/en-us/articles/360028572351-Installing-a-custom-version-of-Perl-locally
I run into these errors upon running the 'make test' command.
I am running on Ubuntu 20.04.4 LTS and currently have Perl version 5.30.0.
I don't know if this solves your problem, but before you compile older perls with current toolsets, use Devel::PatchPerl. ikegami mentioned perlbrew in his comment to the question: it's smart enough to do that step for you.
But, what happens when you try to run your application with recent Perls? That might be an easy thing to fix. Most new things are feature-gated or only available on request.

Can not install Apache2::Const module

I have installed Apache 2.2.25 with mod_perl 2.0.7 running on Debian 7.1.0. During its installation mod_perl had to install module named Apache2::Const, but it didn't. mod_perl have installed modules from the same group, e.g. Apache2::Access, Apache2::Connection, Apache2::RequestUtil.
So when I use this command (i /Apache2::Const/) in cpan shell it outputs following:
cpan[3]> i /Apache2::Const/
Module id = Apache2::ConstantsTable
CPAN_USERID PHRED (Fred Moyer <fred#redhotpenguin.com>)
CPAN_VERSION undef
CPAN_FILE P/PH/PHRED/mod_perl-2.0.8.tar.gz
UPLOAD_DATE 2013-04-18
INST_FILE (not installed)
And when I use this command (install Apache2::Const):
cpan[4]> install Apache2::Const
Warning: Cannot install Apache2::Const, don't know what it is.
Try the command
i /Apache2::Const/
to find objects with matching identifiers.
I've tried to run:
install Apache2::ConstantsTable
But it didn't help.
Also, when I run following script:
perl -e "use v5.14.2; use Apache2::Const"
it outputs:
Not a CODE reference at /usr/lib/perl/5.14/DynaLoader.pm line 207.
END failed--call queue aborted at /usr/local/lib/perl/5.14.2/ModPerl/Const.pm line 207.
Compilation failed in require at /usr/local/lib/perl/5.14.2/Apache2/Const.pm line 18.
BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Apache2/Const.pm line 18.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
I tried to install this module manually (via Makefile.PL) from mod_perl package. I also tried to reinstall mod_perl. Nothing helped.
All the other Apache2::* modules works correctly.
I really need to install Apache2::Const module. Thanks for your replies.
Solved long time ago by installing all this stuff from debian package. I was hard noob in linux when I posted the question.

postgres 9.1 "IN6ADDR_ANY" is not exported by the Socket module

I searched but didn't find the answer why I got error on installation:
$ sudo aptitude install postgresql-9.1 postgresql-contrib-9.1 python-pygresql libpq-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done
The following NEW packages will be installed:
libossp-uuid16{a} postgresql-9.1 postgresql-common{a} postgresql-contrib-9.1 python-pygresql
0 packages upgraded, 5 newly installed, 0 to remove and 32 not upgraded.
Need to get 0B/7,463kB of archives. After unpacking 21.2MB will be used.
Do you want to continue? [Y/n/?] Y
Writing extended state information... Done
Preconfiguring packages ...
Selecting previously deselected package libossp-uuid16.
(Reading database ... 414497 files and directories currently installed.)
Unpacking libossp-uuid16 (from .../libossp-uuid16_1.6.2-1ubuntu1_amd64.deb) ...
Selecting previously deselected package postgresql-common.
Unpacking postgresql-common (from .../postgresql-common_133~lucid_all.deb) ...
Adding `diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Selecting previously deselected package postgresql-9.1.
Unpacking postgresql-9.1 (from .../postgresql-9.1_9.1.4-1~lucid4_amd64.deb) ...
Selecting previously deselected package postgresql-contrib-9.1.
Unpacking postgresql-contrib-9.1 (from .../postgresql-contrib-9.1_9.1.4-1~lucid4_amd64.deb) ...
Selecting previously deselected package python-pygresql.
Unpacking python-pygresql (from .../python-pygresql_1%3a4.0-2_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up libossp-uuid16 (1.6.2-1ubuntu1) ...
Setting up postgresql-common (133~lucid) ...
"IN6ADDR_ANY" is not exported by the Socket module
Can't continue after import errors at /usr/share/postgresql-common/PgCommon.pm line 19
BEGIN failed--compilation aborted at /usr/share/postgresql-common/PgCommon.pm line 19.
Compilation failed in require at /usr/share/postgresql-common/run-upgrade-scripts line 18.
BEGIN failed--compilation aborted at /usr/share/postgresql-common/run-upgrade-scripts line 18.
"IN6ADDR_ANY" is not exported by the Socket module
Can't continue after import errors at /usr/share/postgresql-common/PgCommon.pm line 19
BEGIN failed--compilation aborted at /usr/share/postgresql-common/PgCommon.pm line 19.
Compilation failed in require at /usr/share/postgresql-common/pg_checksystem line 20.
BEGIN failed--compilation aborted at /usr/share/postgresql-common/pg_checksystem line 20.
Setting up postgresql-9.1 (9.1.4-1~lucid4) ...
**"IN6ADDR_ANY" is not exported by the Socket module
Can't continue after import errors at /usr/share/postgresql-common/PgCommon.pm line 19
BEGIN failed--compilation aborted at /usr/share/postgresql-common/PgCommon.pm line 19.
Compilation failed in require at /usr/bin/pg_createcluster line 19.
BEGIN failed--compilation aborted at /usr/bin/pg_createcluster line 19.
Error: could not create default cluster. Please create it manually with
pg_createcluster 9.1 main --start
or a similar command (see 'man pg_createcluster').**
update-alternatives: using /usr/share/postgresql/9.1/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.
Setting up postgresql-contrib-9.1 (9.1.4-1~lucid4) ...
Setting up python-pygresql (1:4.0-2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for python-central ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done
Writing extended state information... Done
I don't konw what's IN6ADDR_ANY and how set it to be exported by the Socket module.
I tried to install it on ubuntu 10.04 after sudo add-apt-repository ppa:pitti/postgresql
The problem is that the Socket module was not updated, and the old version of Socket does not export IN6ADDR_ANY. (see /usr/lib/perl/5.12.4/Socket.pm). The version on my machine was 1.87_01, and that version does not export IN6ADDR_ANY. The newest version is 2.002.
The problem was probably that someone forgot to enter Socket 2.002 as a dependency when they packaged the new postgresql-9.1 dpkg.
The fix is to update the Socket module:
$ sudo apt-get install libsocket-perl
In case that doesn't work for you, try upgrading Socket via cpan:
$ sudo apt-get install cpan
$ sudo cpan Socket
Edit:
In the case where Socket won't install via the commands above and is bombing out with the message "BEGIN failed--compilation aborted at Makefile.PL line 6", run:
$ sudo cpan ExtUtils::Constant
This will get you ExtUtils::Constant v0.23 which is necessary for updating Socket. You should then be able to run:
$ sudo cpan Socket
without issue.
I used other ppa and it worked:
ppa:flexiondotorg/postgres
To remove old one I used ppa-purge this way:
wget http://launchpadlibrarian.net/53004738/ppa-purge_0%2Bbzr46.1~lucid1_all.deb &&
sudo dpkg -i ppa-purge_0+bzr46.1~lucid1_all.deb
sudo ppa-purge ppa:pitti/postgresql
Adding new ppa:
sudo add-apt-repository ppa:flexiondotorg/postgres
sudo apt-get update
To fix the problem, I downgraded postgresql-client-common and postgresql-common back to the previous "130~lucid" versions.
Luckily, the packages were in my apt archive, located at /var/cache/apt/archives on my machine (running Ubuntu 10.10).
Simply installed them using dpkg
sudo dpkg -i postgresql-client-common_130~lucid_all.deb
sudo dpkg -i postgresql-common_130~lucid_all.deb
It is kind of funny that this just happened someone else on the same day it happened to me when I upgraded from postgres 8.4 to 9.1.
I had exactly the same problem and found the solution right here and just at the right time!
I # the rows 19 and 684 to 687 in /usr/share/postgresql-common/PgCommon.pm like someone (Billy Monk) wrote yesterday (and obviously changed or deleted his post now).
And it worked.
I will try the solution with updating the socket now.
Thanks a lot.
This worked for me ( on Ubuntu 10.04LTS ):
$ sudo apt-get update
$ sudo apt-get install libcpan-mini-perl
$ sudo cpan ExtUtils::Constant
$ sudo cpan Socket

Compile in 32 bits mode in x86_64 architecture

Im running on a machine with x86_64 architecture, with 32-bits compiled Perl 5.8.4. When I trying to install XML::LibXML i get following debug message:
...
...
# Running under perl version 5.008004 for linux
# Current time local: Fri Oct 7 08:43:24 2011
# Current time GMT: Fri Oct 7 06:43:24 2011
# Using Test.pm version 1.25
Can't load 'blib/arch/auto/Conftest/Conftest.so' for module Conftest: blib/arch/auto/Conftest/Conftest.so: wrong ELF class: ELFCLASS64 at /app/perl/.sys/i386_linux24/5.8.4/lib/5.8.4/i686-lin
ux-thread-multi/DynaLoader.pm line 230.
at test.pl line 2
Compilation failed in require at test.pl line 2.
BEGIN failed--compilation aborted at test.pl line 2.
not ok 1
# Failed test 1 in test.pl at line 1
# test.pl line 1 is: use Test; BEGIN { plan tests => 1; } END { ok($loaded) }
make: *** [test_dynamic] Error 255
system call to 'make test 'OTHERLDFLAGS='' failed at Makefile.PL line 495.
no
libxml2, zlib, and/or the Math library (-lm) have not been found.
Try setting LIBS and INC values on the command line
Or get libxml2 from
http://xmlsoft.org/
If you install via RPMs, make sure you also install the -devel
RPMs, as this is where the headers (.h files) are.
Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
to see the exact reason why the detection of libxml2 installation
failed or why Makefile.PL was not able to compile a test program.
So the question is, how can I describe in the .cpan properties (or in the Makefile.PL) that I would like to compile XML::LibXML in 32-bits mode in an 64-bits architecture?
B.R CH
above all, check whether libxml2-devel and zlib-devel packages were installed on your system as follow:
$ rpm -ql libxml2-devel
$ rpm -ql zlib-devel
if any of them were not installed, install the missing packages as follow :
$ yum install libxml2-devel
$ yum install zlib-devel
re-install XML::LibXML pacak with CPAN as follow :
$ cpan
cpan> install XML::LibXML
I hope that this will be helpful.
Good luck!

installing mysql-python on Centos

Trying to install mysql-python. Got following error. Got mysql and pythond already installed. Any help will be highly appreciated
[root#uu include]# easy_install mysql-python
Searching for mysql-python
Reading http://cheeseshop.python.org/pypi/mysql-python/
Couldn't find index page for 'mysql-python' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://cheeseshop.python.org/pypi/
Reading http://cheeseshop.python.org/pypi/MySQL-python/1.2.3c1
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3c1
Downloading http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz#md5=310dd856e439d070b59ece6dd7a0734d
Processing MySQL-python-1.2.3c1.tar.gz
Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-toQ0nx/MySQL-python-1.2.3c1/egg-dist-tmp-OeN5eG
unable to execute gcc: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
This will install GCC and others often required:
yum groupinstall 'Development Tools'
Can also be installed individual i.e yum install gcc
you need to install gcc (on centos, some variety of dev-tools)