Perl Dist::Zilla doesn't install because of Net::SSLeay on Debian Wheezy - perl

I am using perlbrew together with cpanm on debian wheezy.
I tried to install Dist::Zilla but installation failed because of Net::SSLeay.
Error message: SSLeay.xs:153:25: fatal error: openssl/err.h: Datei oder Verzeichnis nicht gefunden (German for "openssl/err.h not found").
People suggest installing libssl-dev which I have already done and does not help.
Is it that something has changed from Squeeze to Wheezy and Perl-Modules are not aware of yet??

The problem is likely that OpenSSL needs to be compiled into the Perlbrew environment -- the same environment that will run Net::SSLeay. Try this recipe:
Install dependencies:
sudo apt install build-essential checkinstall zlib1g-dev -y
Create a subdirectory for OpenSSL under Perlbrew:
mkdir ~/perl5/perlbrew/openssl
Download & extract latest LTS OpenSSL into above directory. To determine latest LTS OpenSSL, go to https://openssl.org/source/ and find the latest stable version. For example below we use openssl-1.1.1.tar.gz:
cd ~/perl5/perlbrew/openssl
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz [replace with latest LTS version]
tar -xf openssl-1.1.1.tar.gz
cd openssl-1.1.1
Install and compile. Starting at above directory:
./config shared --prefix=$PERLBREW_ROOT/openssl
make
make test
Install Net::SSLeay using cpanm:
cpanm install Net::SSLeay

Related

Unable to install Bio::SeqIO module on Ubuntu for Windows 10 from Microsoft Store

I used Ubuntu 18.04 LTS for Windows from Microsoft store and tried to install BioPerl module Bio::SeqIO with cpanm Bio::SeqIO. Perl version is v5.26.1. It seems that module installation failed:
! Installing the dependencies failed: Module 'XML::Twig' is not installed, Module 'XML::LibXNL::Reader' is not installed, Module 'XML::LibXML' is not installed, Module 'XML::Parser::PerlSAX' is not installed, Module 'XML::DOM::XPath' is not installed, Module 'XML::DOM' is not installed
! Bailing out the installation for BioPerl-1.7.7
58 distributions installed
If i run a script with line use Bio::SeqIO; I get an error:
Can't locate Bio/SeqIO.pm in #INC (you may need to install the
Bio::SeqIO module) (#INC contains: ...
I am not sure how to proceed. I could try to install dependencies that failed with cpanm but I do not know if it is a proper way.
I tried this on my Windows 10 laptop:
Installed WSL Ubuntu 18.10 as described here, then
Using the system perl, i.e /usr/bin/perl (maybe it would have been better to use perlbrew and installed a custom perl and such avoid using sudo) from the Linux terminal window:
sudo apt-get update
sudo apt-get -y install make gcc libexpat1-dev
sudo cpan local::lib
sudo cpan App::cpanminus
sudo cpanm -n Time::Zone # <-- failed tests
sudo cpanm -n XML::DOM::XPath # <-- failed tests
sudo cpanm Bio::SeqIO
This worked for me.
Perhaps sudo apt-get install bioperl bioperl-run would install all modules which you might need in feature.
Bioperl

How to install Filter::Crypto module for perl under ubuntu

I use command:
cpanm --sudo --interactive Filter::Crypto
I am always asked for location of openssl.
Then I run command:
dpkg -L openssl
I get many paths.
I dont know what should I do next.
thanks
To install this module, the develop files of openssl are needed. Under Ubuntu, it needs to install package: libssl-dev to get develop files to be installed: so after running sudo apt-get install libssl-dev, the problem is resolved.
In CentOS, install openssl-devel package.

Linux: How to install DBD::Pg module?

Postgres DB is already installed. I'm not using system perl I have installed another perl in "/srv/data203806/Migration/CPAN/localperl/bin". When I'm trying to install, It is asking for PATH TO pg_config:
[root1#frmrszvwb023 bin]# ./cpan install DBD::Pg
Reading '/root/.cpan/Metadata'
Database was generated on Fri, 07 Mar 2014 03:53:02 GMT
Running install for module 'DBD::Pg'
Running make for T/TU/TURNSTEP/DBD-Pg-3.0.0.tar.gz
Checksum for /root/.cpan/sources/authors/id/T/TU/TURNSTEP/DBD-Pg-3.0.0.tar.gz ok
CPAN.pm: Building T/TU/TURNSTEP/DBD-Pg-3.0.0.tar.gz
Configuring DBD::Pg 3.0.0
Path to pg_config?
No POSTGRES_HOME defined, cannot find automatically
Warning: No success on command[/srv/data203806/MUXmh-Migration/CPAN/localperl/bin/perl Makefile.PL]
'YAML' not installed, will not store persistent state
TURNSTEP/DBD-Pg-3.0.0.tar.gz
/srv/data203806/MUXmh-Migration/CPAN/localperl/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Please help me to install DBD::Pg? How to get path to pg_config?
Just ran into this issue, and on Ubuntu 16.04 Xenial the package you're looking for is:
apt-get install libdbd-pg-perl
You have to install libpq-dev, e.g. on Ubuntu:
sudo apt-get install libpq-dev
On CentOS/RH you can fix it by installing perl-DBD-Pg package with yum
sudo yum install perl-DBD-Pg
From the README:
INSTALLATION:
Before installing, please use the "cpansign -v" program to
cryptographically verify that your copy of DBD::Pg is complete and
valid. The program "cpansign" is part of Module::Signature, available
from CPAN.
By default Makefile.PL uses App::Info to find the location of the
PostgreSQL library and include directories. However, if you want to
control it yourself, define the environment variables POSTGRES_INCLUDE
and POSTGRES_LIB, or define just POSTGRES_HOME. Note that if you have
compiled PostgreSQL with SSL support, you must define the POSTGRES_LIB
environment variable and add "-lssl" and "-lcrypto" to it, like this:
export POSTGRES_LIB="/usr/local/pgsql/lib -lssl -lcrypto"
The usual steps to install DBD::Pg:
perl Makefile.PL
make
make test
make install
Do steps 1 to 2 as a normal user, not as root!
If the script cannot find the pg_config information itself, it will
ask you for the path to it. Enter the complete path to the pg_config
file here, including the name of the file itself.
If you want to use a module, read the documentation.
Before installing perl module, you must install client for accessing Postgres DB. I just install server and header files:
sudo apt-get install postgresql
sudo apt-get install libpq-dev
You can try:
locate pg_config
This will show something like:
/usr/pgsql-10/bin/pg_config
/usr/pgsql-10/include/ecpg_config.h
/usr/pgsql-10/include/ecpg_config_x86_64.h
Then run:
POSTGRES_HOME=/usr/pgsql-10 ./cpan install DBD::Pg
UPD
If you still encounter issues with pg_config, you may need to add it to your PATH, e.g.:
export PATH=$PATH:/usr/pgsql-x.x/bin
where x.x is your version, such as /usr/pgsql-9.2./bin.
Fedora 29, plenv, perl v5.18.0
Once I got plenv working, I was able to install DBD::Pg with cpanm using these commands:
sudo dnf install postgresql postgresql-devel
cpanm --quiet --notest DBD::Pg
For ArchLinux (or any Distro using Pacman):
pacman -S perl-dbd-pg
For my Ubuntu 22 worked this:
sudo apt install build-essential
sudo apt install cpanminus
sudo apt-get install -y postgresql-server-dev-all
sudo cpanm DBD::Pg

In Centos 6.4,when configure Emacs

In Centos 6.4,when configure Emacs,it shows:
configure: error: The required function `tputs' was not found in any library.
The following libraries were tried (in order):
libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.
How to fix it,what's the problem in it.
sudo yum install ncurses-devel
then ./configure again
Try to install libncurses-dev with
bash
apt-get install libncurses-dev
I'm on a Debian Wheezy derived distribution (CrunchBang)
Trying to install Emacs 24.5.1
Had to install libncurses5-dev, then run ./configure
$ sudo apt-get install ncurses-devel
...
E: Unable to locate package ncurses-devel
$ sudo apt-get install libncurses5-dev

Perl Ora2Pg on Ubuntu

I just tried Ora2Pg on my Ubuntu Jaunty Jackalope.
First of all, the installation was hard, but after downloading a few debs & rpms here & there, I was finally managed to install ora2pg via synaptic.
However, when I try to run this command
ora2pg /tmp/ora2pg.conf
I am getting a
install_driver(Oracle) failed: Can't load '/usr/lib/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib/perl/5.10/DynaLoader.pm line 196.
at (eval 14) line 3
Compilation failed in require at (eval 14) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/share/perl5/Ora2Pg.pm line 566
Any ideas what's wrong and how to fix it?
Note: I don't perl. I just started browsing a bit it because of this.
This is the correct sequence for installation:
apt-get install libdbi-perl
apt-get install alien dpkg-dev debhelper build-essential
apt-get install libaio1
apt-get install make
apt-get install alien
apt-get install rpm
apt-get install libpq-dev
download DBD-Oracle-1.74 or last version
download DBD-Pg-3.5.3 or last version
download DBI-1.636 or last version
download ora2pg-17.5 or last version
download oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm
download oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
download oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
after extract rpm package and install:
alien oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
alien oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm
alien oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
dpkg -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.deb
dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb
dpkg -i oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.deb
then:
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
the path of oracle client installation
export ORACLE_HOME=/usr/lib/oracle/12.1/client64/
then, istall the perl extension for Oracle and Postgres
cd DBI-1.636
perl Makefile.PL
make && makeinstall
cd DBD-Oracle-1.74 o DBD-Oracle-1.64
perl Makefile.PL
make && makeinstall
cd DBD-Pg-3.5.3
perl Makefile.PL
make && makeinstall
and finally, install
cd ora2pg-17.x
perl Makefile.PL
make && makeinstall
check in the version is correct
ora2pg -v
and last configure ora2pg.conf on /etc/ora2pg/
insert in file, the configuration for connect to Oracle and Postgres.
DBD::Oracle can't find the Oracle client libraries because they're not in your library path. If you don't have the Oracle client libraries and you don't have a sysadmin to provide them for you, then you need to get the "Oracle Instantclient" package from the oracle website and install it. If you already have Instantclient installed, then you need to add its lib directory (something like /usr/lib/oracle/instantclient/lib or /opt/ora/instantclient10_1/lib) to your library path -- either by adding a line to /etc/ld.so.conf and running ldconfig as root, or by setting the LD_LIBRARY_PATH environment variable.
Pre-installation steps:
ORACLE Client must be installed and ORACLE_HOME must be set.
Install perl (version 5.6 and above)
Installation steps:
Install DBI (database interface module)
apt-get install cpanminus (for ubuntu)
yum install cpanminus (for Linux)
cpanm DBI
Install DBD::Oracle and DBD::Pg
cpanm DBD::Oracle
cpanm DBD::Pg
Download the latest version of ora2pg from http://sourceforge.net/projects/ora2pg/ and run the following commands:
tar -xvf ora2pg-18.0.tar
cd ora2pg-18.0/
perl Makefile.PL
su root
make
make install
Do the changes as per req
By default Ora2Pg will look to ora2pg.conf configuration file into /etc/ora2pg/ directory.
ORACLE_HOME /app/oracle/product/11.2.0
ORACLE_DSN dbi:Oracle:host=[hostname];sid=[SID name]
ORACLE_USER [SYSTEM]
ORACLE_PWD [password]
USER_GRANTS 1
Check the version of pra2pg:
ora2pg SHOW_VERSION
Run the below command
ora2pg -c /etc/ora2pg/ora2pg.conf
ora2pg -c /etc/ora2pg/ora2pg.conf -p -P 10 -J 10 -L 1000000
.sql file will create in the current directory have converted data into PostgreSql
Hope this will work.