在Ubuntu 14.04.3中运行oracle imp/exp [英] running oracle imp / exp in Ubuntu 14.04.3

查看:121
本文介绍了在Ubuntu 14.04.3中运行oracle imp/exp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装oracle软件包后

After installing the oracle packages

oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm

oracle-instantclient12.2-tools-12.2.0.1.0-1.x86_64.rpm

alien -i

我想运行exp实用程序,但出现错误

I want to run the exp utility, but I got an error

root@localhost:/usr/lib/oracle/12.2/client64/bin# ./exp
./exp: error while loading shared libraries: libclntsh.so.12.1: cannot open shared object file: No such file or directory

root@localhost:/usr/lib/oracle/12.2/client64/bin# export
declare -x DERBY_HOME="/usr/lib/jvm/java-8-oracle/db"
declare -x HOME="/root"
declare -x J2REDIR="/usr/lib/jvm/java-8-oracle/jre"
declare -x J2SDKDIR="/usr/lib/jvm/java-8-oracle"
declare -x JAVA_HOME="/usr/lib/jvm/java-8-oracle"
declare -x LANG="en_US.UTF-8"
declare -x LD_LIBRARY_PATH=":/usr/lib/oracle/12.2/client64/lib/libclntsh.so.12.1"
declare -x LESSCLOSE="/usr/bin/lesspipe %s %s"
declare -x LESSOPEN="| /usr/bin/lesspipe %s"
declare -x LOGNAME="root"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
declare -x MAIL="/var/mail/root"
declare -x OLDPWD="/root"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin"
declare -x PWD="/usr/lib/oracle/12.2/client64/bin"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT="212.166.58.203 58642 22"
declare -x SSH_CONNECTION="212.166.58.203 58642 139.162.221.107 22"
declare -x SSH_TTY="/dev/pts/0"
declare -x TERM="xterm-256color"
declare -x USER="root"
declare -x XDG_RUNTIME_DIR="/run/user/0"
declare -x XDG_SESSION_ID="10"

root@localhost:/usr/lib/oracle/12.2/client64/bin# find -L /usr/lib/oracle -name libclntsh.so.12.1
/usr/lib/oracle/12.2/client64/lib/libclntsh.so.12.1
root@localhost:/usr/lib/oracle/12.2/client64/bin# 

推荐答案

这通常是由于您的LD_LIBRARY_PATH环境变量缺少Oracle库引起的.您需要找到libclntsh.so.12.1所在的文件夹并设置该环境变量.

This is normally caused by your LD_LIBRARY_PATH environment variable missing the Oracle libraries. You need to find the folder in which libclntsh.so.12.1 sits and set this environment variable.

希望它在您的Oracle安装目录中,在这种情况下,您可以执行以下操作:

Hopefully it's in your Oracle install directory, in which case you can do this:

find -L /usr/lib/oracle -name libclntsh.so.12.1

find -L开关遵循符号链接.这不是默认行为,但是libclntsh.so.12.1实际上可能是libclntsh.so的符号链接.

The -L switch of find follows symlinks. This is not the default behaviour, however, it's possible that libclntsh.so.12.1 is actually a symlink to libclntsh.so.

如果找不到文件,则必须遍历整个目录结构.可能值得第一次放弃-L开关...

If you can't find the file then you'll have to traverse your entire directory structure. It might be worth ditching the -L switch for the first time...

find -L / -name libclntsh.so.12.1

找到文件后,需要设置LD_LIBRARY_PATH.您只需使用以下一项即可:

Once you've found the file you need to set your LD_LIBRARY_PATH. As just a one off you can use:

 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/oracle/lib

/usr/lib/oracle/lib替换为目录的地方.

如果要永久保留此更改,那么在Ubuntu上,通常的方法是将自定义.conf文件添加到/etc/ld.so.conf,请参见问题 Linux .

If you want to make this change permanent then the normal way on Ubuntu is to add a custom .conf file to /etc/ld.so.conf, see the question "Use shared libraries in /usr/local/lib" on Unix & Linux.

这篇关于在Ubuntu 14.04.3中运行oracle imp/exp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆