在 ubuntu 14.04 上安装 oracle instantclient

在 ubuntu 14.04 上安装 oracle instantclient

我正在尝试安装 oracle instantclient 以便能够使用 php5_oci8 扩展,但是当我尝试使用命令将 rpm 提供的文件转换为 .deb 时alien,出现以下错误:

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

我找不到这个错误,有人能指出正确的方向吗?

答案1

这可能是 Vagrant/Windows 问题,您在尝试从 shred 文件夹安装 RPM 文件时遇到了该问题。

将 RPM 复制到不在共享目录中的 /oracle (或任何)目录,错误就会消失。

答案2

问题是您的系统中没有安装 Oracle 所需的软件包。我建议使用 Oracle 通用安装程序,当您尝试安装时它会指向所需的软件包。

通常,通过运行“Oracle Public Yum”存储库提供的“oracle-rdbms-server-11gR2-preinstall”包可以轻松修复此问题。遗憾的是,我们没有针对 Ubuntu 的此类存储库,而其他系统的包无法正常工作。

如果由于某种原因您不能使用 OUI,那么您可以通过使用 apt-get 安装日志中找不到的每个包来完成漫长的过程。

答案3

我遇到了同样的问题,尝试使用 vmhost /mnt 位置进行安装。复制到虚拟机内的文件夹后,成功安装

相关内容