Ubuntu: Installing oracle instantclient on ubuntu 14.04



Question:

I am trying to install the oracle instantclient to be able to use php5_oci8 extension, but when I try to convert the rpm provided files to .deb with the alien command, I get the following errors:

vagrant@sherwood:/vagrant/src/packages/oracle-instantclient$ sudo alien -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm  Package build failed. Here's the log:  dh_testdir  dh_testdir  dh_testroot  dh_prep  dh_installdirs  dh_installdocs  dh_installchangelogs  find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \                  xargs -0 -r -i cp -a {} debian/oracle-instantclient12.1-basic  dh_compress  dh_makeshlibs  dh_installdeb  dh_shlibdeps  dpkg-shlibdeps: error: couldn't find library libclntsh.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libociei.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libociei.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntsh.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libmql1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libipc1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libnnz12.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntsh.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/genezi (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/genezi (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocci.so.12.1 contains an unresolvable reference to symbol slnxsub: it's probably a plugin  dpkg-shlibdeps: warning: 262 other similar warnings have been skipped (use -v to see them all)  dpkg-shlibdeps: warning: couldn't find library libipc1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libmql1.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libmql1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libipc1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libnnz12.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libons.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libnnz12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntsh.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libmql1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libipc1.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: couldn't find library libnnz12.so needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntsh.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/liboramysql12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: error: couldn't find library libclntshcore.so.12.1 needed by debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/liboramysql12.so (ELF format: 'elf64-x86-64'; RPATH: '')  dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libociei.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/genezi debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntshcore.so.12.1 debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/liboramysql12.so were not linked against libnsl.so.1 (they use none of the library's symbols)  dpkg-shlibdeps: error: cannot continue due to the errors listed above  Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.  To help dpkg-shlibdeps find private libraries, you might need to use -l.  dh_shlibdeps: dpkg-shlibdeps -Tdebian/oracle-instantclient12.1-basic.substvars debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/adrci debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/bin/genezi debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libclntshcore.so.12.1 debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libipc1.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libmql1.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libnnz12.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocci.so.12.1 debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libociei.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libocijdbc12.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/libons.so debian/oracle-instantclient12.1-basic/usr/lib/oracle/12.1/client64/lib/liboramysql12.so returned exit code 2  make: [binary-arch] Error 2 (ignored)  dh_gencontrol  dpkg-gencontrol: warning: Depends field of package oracle-instantclient12.1-basic: unknown substitution variable ${shlibs:Depends}  dh_md5sums  dh_builddeb  dpkg-deb: error: control directory has bad permissions 777 (must be >=0755 and <=0775)  dh_builddeb: dpkg-deb --build debian/oracle-instantclient12.1-basic .. returned exit code 2  make: *** [binary-arch] Error 1  

I found this error nowhere, can someone point me to the correct direction ?


Solution:1

This is probably a Vagrant/Windows problem, that you're encountering when attempting to install the RPM files from a shred folder.

Copy the RPMs to a /oracle (or whatever) directory that's not in your shared directories, and the error should go away.


Solution:2

the problem is you don`t have installed packages needed for oracle in your system. i would recommend to use oracle universal installer, whic points you to packages needed when you try to install it.

usually this problem can be easyly fixed by running “oracle-rdbms-server-11gR2-preinstall” package offered by “Oracle Public Yum” repository. Sadly we don't have such repository for Ubuntu, and packages from other systems doesn't work good.

if, for some reason, you can't use OUI, then you can do it long way by installing with apt-get every package in your log that couldn't be found.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »