how to set oracle client library path in python when multiple oracle client version installed - linux

i have 2 oracle client installed in linux machine. 10.2 and 12.2.
Second one i have to use for cx_oracle and older one is needed for other older implementation which i cant touch.
when i add second 12.2 oracle client library in LD_LIBRARY_PATH path and running simple oracle connection python program, it is giving me below error
cx_Oracle.DatabaseError: DPI-1050: Oracle Client library is at version 10.2 but must be at version 11.2 or higher
How can i use the newer version of client library without touching the old config?

Write a shell script that lists the 12.2 Oracle Client library in LD_LIBRARY_PATH before other Oracle libraries, and then invokes Python.
#!/bin/sh
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2
python "$#"

Related

Presto Admin installion Error

I am getting the below error while trying to install the presto amdin 1.5.1
ERROR Paramiko could not be imported. This usually means that pycrypto (a
dependency of paramiko) has been compiled against a different libc version. > Ensure the presto-admin installer is built on the same OS as the target
installation OS.
The offline installer (which you are using) is compiled for libc version 2.12 (e.g. it works for Centos 6 and some other OSes, but not for Ubuntu 12.04+). Use the online installer for other OSes: https://github.com/prestodb/presto-admin/releases/download/1.5.1/prestoadmin-1.5.1-online.tar.bz2.

In Linux Mint 17.2 (i.e. Ubuntu 14.04), how to make qt 5.4 as the default qt5 library version of programs?

I install the latest qt version from the official website http://www.qt.io/qt5-4/ successfully. I follow this tutorial http://sysads.co.uk/2014/05/install-qt-5-3-ubuntu-14-04 and install the qt 5.4 version. Besides, I have the Ubuntu repository version of qt 5.2.1 installed.
Now I want to make the default version of 5.4 due to a program can't work well in the old qt5 version. That is to say, when I start a program which need to use qt5 library the program will use the version 5.4 rather than the version qt 5.2. Though I have installed the version 5.4 and 5.2, the program still use qt 5.2 version.
I try to use qtchooser to choose the 5.4 version as the default option, however, the program installed in the system still use the qt 5.2 library.
I endeavor to modify the related files regarding qtchooser, nothing changes.
If the library version is not in some regular repository, I would strongly suggest not relying on the user to install it somehow from an "unofficial" install location. Or provide a package for the library version yourself to install alongside your application. But don't replace the system Qt version. That would be Bad®.
Instead, either compile your program with a specific rpath, or wrap your program in scripts that use something like LD_PRELOAD and/or LD_LIBRARY_PATH to load the library version you're shipping in your application package.
Both ways are clunky, and I would try to at least work around the Qt version bug if at all possible.
The latest Qt version (non-alpha) actually is Qt 5.5.
If you install it through the installer provided by Qt, you should change the default Qt version by editing/creating:
/etc/xdg/qtchooser/default.conf
which should contain first the bin directory, then the lib directory, for example:
/opt/Qt/5.5/gcc_64/bin
/opt/Qt/5.5/gcc_64/lib
At least this works for the qmake version. Otherwise you might need to change LD_LIBRARY_PATH as commented by rubenvb.

osm2pgsql with PostgreSQL 9.0

I am using PostgreSQL 9.0. I've installed osm2pgsql package from Debian repositories and now I have two versions of postgres databse installed on my machine (9.0 and 9.1 - installed with osm2pgsql). How can I configure osm2pgsql and postgis to work with 9.0 database?
Debian usually installs multiple versions of PostgreSQL on sequential ports beginning at 5432, so your first installation is at 5432, your second at 5433, and so forth.
PostGIS is typically installed into the database though the mechanism of doing this is different in 9.0 and 9.1 (in 9.0, review the docs to find the appropriate installation method, and you may need to install from source. You would then run a specific .sql file to import the relevant functions. 9.1 uses the CREATE EXTENSION syntax.
For client programs you can set which PostgreSQL installation it will connect to by default (i.e. unless the program specifies otherwise) by setting the PGPORT to the appropriate setting.

Multiple sqlite installs on same server

I've got a server at work on which I am basically building an apache/mysql/subversion/php/python development base. I've found that the RPM repos the server is pointed at only have version 3.3.6-5 of sqlite, which subversion 1.6.17 chokes on, requiring at least version 3.4:
An appropriate version of sqlite could not be found. We recommmend 3.6.13,
but require at least 3.4.0. Please either install a newer sqlite on this
system or get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/root/installs/subversion-1.6.17/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.
I managed to download and build sqlite (sqlite-autoconf-3070701.tar.gz), but now when I run sqlite3, I'm getting the error:
sqlite3: symbol lookup error: sqlite3: undefined symbol: sqlite3_sourceid
I'm sure this is because the PATH variable has the so files for both the rpm installation of sqlite (/usr), and the compiled version I installed (/usr/local). I can't yum remove the exiting sqlite because it is tied to the installation of rpm, so what I would like to do is add whatever I need to my profile or bashrc or whatever other black magic is needed to allow some users to run the updated sqlite install, while others just default to the original install.
Other info:
# cat /etc/*-release
Enterprise Linux Enterprise Linux Server release 5.6 (Carthage)
Oracle Linux Server release 5.6
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
# uname -m
x86_64
Can anyone tell me what I can do to get the two copies of sqlite to play together nicely?
Have you tried what the error message from subversion proposes?
...get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz unpack the
archive using tar/gunzip and copy sqlite3.c from the resulting
directory to:
/root/installs/subversion-1.6.17/sqlite-amalgamation/sqlite3.c

Why do I get "Error 6060" when I try to use DBD::Advantage with a 64-bit perl on Linux?

I realize that I am attempting to go beyond the "supported" behavior of the manf's released drivers for Perl, after all they have only released it in package with x86 .so's.
However, since I cannot use their package with x64 Perl on a RHEL 5.4 x86_64 box, and maintaining a seperate install of x86 Perl just for this one package, I have made an attempt to get this puppy working thanks to released 64-bit .so's that accompany other driver packages for Advantage.
What I have done to this point:
download beta 10 DBI drivers, in 32
download beta 10 PHP extension (it contains 32 and x86_64)
copy the required DLLs into the ads-lib location (eg /usr/local/ads/lib64)
compile the Perl DBI driver with the path to the lib64's .so's
Good compilation, good install, good use.
The problem is that I always get :
failed: [iAnywhere Solutions][Advantage SQL][ASA] Error 6060: Advantage Database Server not available on specified server. axServerConnect (SQL-HY000)(DBD: db_login/SQLConnect err=-1)
Does anyone have any ideas?
EDIT: fixed package name in post title
EDIT: Updated title.
It appears that it's not just the x64 perl, but the RHEL 5.4 underneath that may be interfering. As commented below, I managed to shoe-horn a x86 perl onto the system, and compile the DBD::Advantage 9.99, and later replacing that with 9.10, and none of these x86 would connect either. Neither library (9.99 or 9.10) in either bit-edness will connect from this x86_64 server to the windows server's UNC path.
I have successfully mounted this share without problems, but still I cannot seem to connect to the 9.1. I have tried:
\hostname\PATH
\FQDN\PATH
\IP\PATH
and all of these variations with the port (default) 6262 included.
My windows machine connects fine, with both 9.1 and 9.99 from strawberry perl.
Check the host file on the Linux server and make sure the name of the server uses the actual IP rather then the loopback address.
Also, since you updated the client, did you also install/update the 10 beta server?
Finally, what is your connection string? Have you tried adding the port to the connection string?

Resources