distutils.errors.DistutilsSetupError: cannot locate an Oracle software insta

检测:

1. echo  $ORACLE_HOME是否正确输出oracle-client的路径

2.     env  | grep  ORACLR_HOME 是否也正确输出


若以上输出有问题或无输出,

那么我们这么办:

1.检查/etc/profile 配置是否正确(不要忘记export  ORACLE_HOME),确认是否忘记source /etc/profile

2.sudo visudo  (第二种情况的链接:http://lorcancoyle.org/wiki/public/cxoracle)

# Defaults specification
Defaults        env_reset
Defaults        env_keep += "BLOCKSIZE"
Defaults        env_keep += "COLORFGBG COLORTERM"
Defaults        env_keep += "__CF_USER_TEXT_ENCODING"
Defaults        env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
Defaults        env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
Defaults        env_keep += "LINES COLUMNS"
Defaults        env_keep += "LSCOLORS"
Defaults        env_keep += "SSH_AUTH_SOCK"
Defaults        env_keep += "TZ"
Defaults        env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
Defaults        env_keep += "EDITOR VISUAL"

and if you find them, add the following line and save the file and exit:

Defaults        env_keep += "ORACLE_HOME"



你可能感兴趣的:(DataBase)