Okay, so I was trying to install a combination of the CGI module, DBI module, and DBD::Oracle driver using CPANM on a 64bit Solaris 11 machine with an Oracle11g database.
I installed that latest version of Perl using Perlbrew, updated CPANM, and then did the following...
cpanm -v -f -i CGI
cpanm -v -f -i DBI
And both of those modules installed fine, the DBI did have a small test error (t/zvxnp_85gofer.t) when I tried to install it normally, but the force install seemed to work.
So then I went to try to install the final part that I needed:
cpanm -v -f -i DBD::Oracle
And this was the error that came out towards the end of the installation...
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/oracle/rdbms/lib" gcc -G -L/usr/gnu/lib -fstack-protector Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/opt/oracle/rdbms/lib/ -lclntsh -lkstat -lnsl -lsocket -lresolv -lgen -ldl -lsched -lrt -R/opt/oracle/rdbms/lib -laio -lposix4 -lkstat -lm -lpthread \
ld: fatal: file /opt/oracle/rdbms/lib//libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
FAIL
! Installing DBD::Oracle failed. See /home/oracle/.cpanm/build.log for details.
I'm guessing just from the wrong ELF class: ELFCLASS64 it has to do with some mismatch between the 64 bit binaries that exist and that this driver requires the 32 bit binaries to install? Some research has indicated that I need to find the lib32 directory to continue the installation, but I can't seem to find it.
I did:
echo $ORACLE_HOME ---> /opt/oracle/rdbms
ls $ORACLE_HOME
That returned the following directories...
apex emcli mgw rdbms
assistants has network relnotes
bin hs nls root.sh
ccr ide oc4j scheduler
cdata install odbc slax
cfgtoollogs install.platform olap sqldeveloper
clone instantclient ons sqlj
config inventory OPatch sqlplus
crs j2ee opmn srvm
csmig javavm oracore sysman
css jdbc oraInst.loc timingframework
ctx jdev ord ucp
cv jdk oui uix
dbs jlib owb utl
dc_ocm ldap owm wwg
deinstall lib64 perl xdk
demo log plsql
diagnostics md precomp
dv mesg racg
So I see a lib64, but no lib or lib32. Has anyone ever had this problem before, found a solution to it, or know how I could continue from here?
I had the same issue. Fixed it by doing ./Configure -es -Dprefix=$HOME/usr/local -Dcc=gcc -Duse64bitall -Dusethreads for perl install
please take a look at 1271236.1 and 883702.1 at oracle.com. It will explain how to get the 32bit libraries for 11i client installation.
Related
I am trying to install Net::SSLeay perl package on Mac OSX Catalina using perlbrew cpanm and failing due to openssl related issues.
I tried all of the bellow solutions to no avail:
cmake - osx/mac - openssl brew
https://gist.github.com/andyjack/7dd4d7b65d262b2a6e56
https://medium.com/#deepak.gulati/installing-net-ssleay-on-os-x-el-capitan-446c40cffeba
https://phillipadsmith.com/2016/03/Installing-Net-SSLeay-on-OS-X-El-Capitan.html
https://apple.stackexchange.com/questions/240589/crypt-ssleay-on-a-macbook
https://macosx.com/threads/howto-installing-openssl-and-the-ssl-perl-module-net-ssleay-pm.12075/
I have open ssl latest and added the suggested exports to my .zshrc
I added these to .zshrc:
# Warning: Refusing to link macOS-provided software: openssl#1.1
# If you need to have openssl#1.1 first in your PATH run:
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
# For compilers to find openssl#1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
# For pkg-config to find openssl#1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
the basic failure is:
cpanm (App::cpanminus) 1.7044 on perl 5.030001 built for darwin-2level
Work directory is /Users/<me>
/.cpanm/work/1583739797.88350
You have make /usr/bin/make
You have LWP 6.43
You have /usr/bin/tar: bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
You have /usr/bin/unzip
Searching Net::SSLeay () on cpanmetadb ...
--> Working on Net::SSLeay
Fetching http://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.88.tar.gz
-> OK
Unpacking Net-SSLeay-1.88.tar.gz
Entering Net-SSLeay-1.88
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Configuring Net-SSLeay-1.88
Running Makefile.PL
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] n
*** Found LibreSSL-2.8.3 installed in /usr
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0.60_01 ... Yes (1.302162)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have MIME::Base64 0 ... Yes (3.15)
Building and testing Net-SSLeay-1.88
cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Net/SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
Running Mkbootstrap for SSLeay ()
chmod 644 "SSLeay.bs"
"/Users/<me>
/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Net/SSLeay/SSLeay.bs 644
"/Users/<me>
/perl5/perlbrew/perls/perl-5.30.1/bin/perl" "/Users/<me>
/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/ExtUtils/xsubpp" -typemap '/Users/<me>
/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/ExtUtils/typemap' -typemap '/Users/<me>
/.cpanm/work/1583739797.88350/Net-SSLeay-1.88/typemap' SSLeay.xs > SSLeay.xsc
mv SSLeay.xsc SSLeay.c
cc -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"1.88\" -DXS_VERSION=\"1.88\" "-I/Users/<me>
/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" SSLeay.c
SSLeay.xs:163:10: fatal error: 'openssl/err.h' file not found
#include <openssl/err.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [SSLeay.o] Error 1
-> FAIL Installing Net::SSLeay failed. See /Users/<me>
/.cpanm/work/1583739797.88350/build.log for details. Retry with --force to force install it.
Finally after much fiddling I found this post:
OSX Catalina work around
I uninstalled latest perlversion:
perlbrew uninstall perl-5.30.1
Then I ran this script
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "$0 is running from: $DIR"
# make this file's location working dir
cd "$(dirname "$0")"
v='perl-5.30.1'
perl_versions=$(perlbrew list)
echo "perl_versions $perl_versions"
if [[ "$perl_versions" == *"$v"* ]]; then
echo "$v is installed in perlbrew."
else
echo "$v is not!!! installed in perlbrew. installing ...."
perlbrew install perl-5.30.1 --notest --force
fi
current_perl_version=$(which perl)
echo "current_perl_version: $current_perl_version"
if [[ "$current_perl_version" == *"$v"* ]]; then
echo "$v is current version."
else
echo "$v is not current version."
perlbrew switch $v
fi
cpanm install --force Test::Block
cpanm install Try::Tiny
cpanm install YAML
cpanm install YAML::XS
cpanm install JSON
cpanm install JSON::MaybeXS
cpanm install HTTP::Request
cpanm install HTTP::Response
cpanm install HTTP::Daemon
cpanm install GD::Simple
cpanm install GD::Graph
cpanm install Data::HexDump::Range
cpanm install Proc::Daemon
cpanm install Test::Block
cpanm install Text::Colorizer
cpanm install Gzip::Faster
cpanm install IO::Socket::INET6
#export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
#export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
#export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
cpanm install DBI
#cpanm install Net::SSLeay
OPENSSL_PREFIX=/usr/local/opt/openssl#1.1 cpanm --interactive --verbose --force Net::SSLeay
cpanm install --force Cassandra::Client
cpanm install DBD::Cassandra
#cpanm install https://cpan.metacpan.org/authors/id/T/TV/TVDW/Cassandra-Client-0.16.tar.gz
cpanm install Proc::ProcessTable
cpanm install Kafka::Connection
During the Net::SSLeay installation I was prompted for manual confirmation for tests dependant on network connectivity and answered y. If anyone knows auto-approve in perlbrew please post a comment, A quick scower of perlbrew -h wasn't informative as to auto approve options at first glance.
I tried this on macOS Catalina (note my shell is bash and not the default zsh):
brew install openssl
\curl -L https://install.perlbrew.pl | bash
After perlbrew is installed, edit ~/.bash_profile :
source ~/perl5/perlbrew/etc/bashrc
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
Then save, and execute
$ source ~/.bash_profile
$ perlbrew install-cpanm
$ perlbrew install perl-5.30.1 --notest
$ perlbrew switch perl-5.30.1
$ cpanm Net::SSLeay
--> Working on Net::SSLeay
Fetching http://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.88.tar.gz ... OK
Configuring Net-SSLeay-1.88 ... OK
Building and testing Net-SSLeay-1.88 ... OK
Successfully installed Net-SSLeay-1.88
1 distribution installed
So my guess would be that the issue is related to zsh, since I used bash and you used zsh.
I find problems when I started to compile openjdk for my first time.
Below is what I did
hg clone http://hg.openjdk.java.net/jdk9/dev 9dev
cd 9dev
bash ./get_source.sh
bash ./configure
Then, I got this error message
configure: error: Could not find X11 libraries. You might be able to fix this by running 'sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel'.
Then, I did what it told me to do.
After the installation, the same error still exists.
So I checked where the files lies on my machine
rpm -qa | grep X11
libX11-1.6.3-3.el7.x86_64
libX11-common-1.6.3-3.el7.noarch
libX11-devel-1.6.3-3.el7.x86_64
rpm -ql libX11-1.6.3-3.el7.x86_64
/usr/lib64/libX11-xcb.so.1
/usr/lib64/libX11-xcb.so.1.0.0
/usr/lib64/libX11.so.6
/usr/lib64/libX11.so.6.3.0
so i tried the way of specifying the X11 path
bash ./configure --x-libraries=/usr/lib64
Unfortunately, the same error still stays.
Can someone help me out of here, please?
thx
update
Thank #omajid for directing me to the log file config.log, where I found that the configure is using the gcc in my linuxbrew installation.
configure:56234: /data/alex/git/brew/bin/g++ -o conftest conftest.cpp -lX11 >&5
/data/alex/git/brew/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
configure:56234: $? = 1
So after I exported my c compiler to the system one, the problem was fixed.
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
Here is the relevant packages needed at build time and the configure flags I use in my spec file for building unofficial OpenJDK 9 packages for Fedora/EPEL:
autoconf
automake
alsa-lib-devel
binutils
cups-devel
desktop-file-utils
fontconfig
freetype-devel
elfutils
giflib-devel
gcc-c++
gdb
gtk2-devel
lcms2-devel
libjpeg-devel
libpng-devel
libxslt
libX11-devel
libXi-devel
libXinerama-devel
libXt-devel
libXtst-devel
nss-devel
pkgconfig
xorg-x11-proto-devel
zip
java-1.8.0-openjdk-devel
bash ../configure \
--with-boot-jdk=/usr/lib/jvm/java-1.8.0-openjdk/ \
--with-native-debug-symbols=internal \
--enable-unlimited-crypto \
--with-zlib=system \
--with-libjpeg=system \
--with-giflib=system \
--with-libpng=system \
--with-lcms=system \
--with-stdc++lib=dynamic \
--disable-javac-server \
--disable-warnings-as-errors
In any case, the error messages produce by configure are a best guess. You should take a look at config.log to see what test actually failed and what the error messages are. In this case, it looks like you are probably missing one of several X11 libraries. Possibly libXinerama-devel.
If this still doesn't fix your error, please paste the error messages from your autoconf log file (should be named config.log or configure.log, I forget).
I'm trying to install Perl modules Geo::ShapeFile and Math::Round but I keep coming across the same error and I can't find a solution that works. I've local::lib installed fine but its not being found or something? Am I doing it in the wrong place?
cian#cian-Aspire-5750:~/Documents/Math-Round-0.07$ make install
Manifying 1 pod document
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/man/man3'
mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.22/ExtUtils/Install.pm line 477.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1.
Makefile:697: recipe for target 'pure_site_install' failed
make: *** [pure_site_install] Error 13
I notice in my directory '/usr/local/man' points to 'usr/share/man'. I dunno if this was an issue how to solve it. Thanks.
I've local::lib installed fine
No, you don't. The environment has clearly not by set by local::lib. Make sure the following in your login script:
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
(Adjust the path to local::lib if needed.)
Log out and log back in or use the following to pick up the changes:
exec bash -l
If you want to install module systemwide (it's what you do), you should have root privileges. Try sudo make install or install modules locally.
Alternatively you may try a cpanm client, which handles local::lib installs either:
$ cpanm -l ~/ Geo::ShapeFile Math::Round
And then don't forget to adjust perl5lib var to see installed modules:
$ PERL5LIB=~/lib/perl5
Instaling PGPLOT the install gets stopped for ever here:
$ cpanm PGPLOT
--> Working on PGPLOT
Fetching http://www.cpan.org/authors/id/K/KG/KGB/PGPLOT-2.21.tar.gz ... OK
Configuring PGPLOT-2.21 ... OK
Building and testing PGPLOT-2.21 ...
Looking at the Build.log seems that it is waiting for a prompt answer
$ tail ~/.cpanm/build.log
-L/usr/lib -L/usr/local/lib -lcpgplot -lpgplot -lX11 -lpng -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib -lgfortran -lm \
chmod 755 blib/arch/auto/PGPLOT/PGPLOT.so
cp PGPLOT.bs blib/arch/auto/PGPLOT/PGPLOT.bs
chmod 644 blib/arch/auto/PGPLOT/PGPLOT.bs
Manifying blib/man3/PGPLOT.3
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File `Makefile' has modification time 3e+02 s in the future
PERL_DL_NONLAZY=1 /home/pmg/perl5/perlbrew/perls/perl-5.16.0/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
Default Device for plot tests [recommend /XSERVE] ?
How can I avoid this question either forcing defaults or given the option through env. vars?
[UPDATE] FIX
From the Russell answer I exported the variable for device
export PGPLOT_DEV=/XSERVE; cpanm PGPLOT
And connected with x11vnc to the server (to the main display) for closing all windows the pgplot test was displaying.
[NOTE] don't try to install pgplot perl lib under screen even with ssh -X, chances are that you are not in the same computer you starter your original screen and the X redirection will not work. You can circumvent that limitation with a vnc connection to main display or you will not being able to finish the installation. xrdp and other vnc that open a new session will not work. You need to share the main display.
From reading test.pl in the distribution, it checks the PGPLOT_DEV environment variable. It looks like the valid values are /XSERVE for Unix/Linux and /PNG for Windows.
I have already installed GD.pm. I want to make sure it supports PNG.
So to check that I do this:
$ perl -e 'use GD; $im=GD::Image->new(); print $im->can("png") ? "yes" : "no" , "\n";'
no
As you see. It prints no.
Then I download the latest GD from CPAN with the following process:
> wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.53.tar.gz
> tar xvfz GD-2.53.tar.gz
> cd GD-2.44
> perl Makefile.PL
> make
> make test
> make install
I expect it to contain the line like this which is a hallmark of the installed PNG support:
Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE
GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF
GD_FTCIRCLE VERSION_33
But instead I got this only:
Included Features: GD_GIF GD_GIFANIM GD_OPENPOLYGON
I wasn't successful with this command either sudo perl Makefile.PL -options "JPEG,FT,PNG".
It didn't show GD_PNG.
What's the way to install GD.pm with PNG support?
I need it to run circos.
Update:
After installing libpng and rebuilding GD
$ brew update && brew upgrade
$ brew install gd
$ brew install libpng
$ sudo cpan
cpan > force install GD
as adviced, I got this error:
$ perl -e 'use GD; $im=GD::Image->new(); print $im->can("png") ? "yes" : "no" , "\n";'
Can't load '/Library/Perl/5.16/darwin-thread-multi-2level/auto/GD/GD.bundle' for module GD: dlopen(/Library/Perl/5.16/darwin-thread-multi-2level/auto/GD/GD.bundle, 1): Library not loaded: libpng15.15.dylib
Referenced from: /usr/local/lib/libfreetype.6.dylib
Reason: image not found at /System/Library/Perl/5.16/darwin-thread-multi-2level/DynaLoader.pm line 194.
at -e line 1.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Update 2:
Finally I fixed the problem by doing this:
$ locate libpng15.15.dylib
/anaconda/lib/libpng15.15.dylib
/anaconda/pkgs/libpng-1.5.13-1/lib/libpng15.15.dylib
/opt/X11/lib/libpng15.15.dylib
/opt/local/lib/libpng15.15.dylib
$ ln -s /opt/X11/lib/libpng15.15.dylib /usr/local/lib/libpng15.15.dylib
$ perl -e 'use GD; $im=GD::Image->new(); print $im->can("png") ? "yes" : "no" , "\n";'
yes
You need libraries as dependencies before making GD.pm. In this particular case libpng is obviously missing.
Because of that dependency, I recommend that you use package managers, not CPAN, if your perl is the one that comes with your OS:
MacPorts or homebrew for OS X
apt-get for Debian and Ubuntu.
yum for RHEL, Cent-OS.