【问题标题】:error: cannot locate an Oracle software installation错误:找不到 Oracle 软件安装
【发布时间】:2023-03-06 05:12:02
【问题描述】:

我正在开发 Plone。

前奏曲

我已经安装了:

oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64.rpm oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64.rpm

还有 cx_Oracle。 我已经测试了安装,一切正常:数据库连接成功。

echo $ORACLE_HOME
/usr/lib/oracle/12.1/client64
echo $TNS_ADMIN
/usr/lib/oracle/12.1/client64/admin
echo $LD_LIBRARY_PATH
/usr/lib/oracle/12.1/client64/lib

问题

我已将 buildout.cfg 编辑如下:

[...]
eggs =
    Plone
    Pillow
    collective.documentviewer
    Products.OpenXml
    Products.AROfficeTransforms
    tus
    wildcard.foldercontents==2.0a7
    **cx_Oracle**
[...]

我收到此错误:

Unused options for buildout: 'environment-vars'.
Installing instance.
Getting distribution for 'cx-Oracle'.
error: cannot locate an Oracle software installation
An error occurred when trying to install cx-Oracle 5.1.3. Look above this message for any errors that were output by easy_install.
While:
  Installing instance.
  Getting distribution for 'cx-Oracle'.
Error: Couldn't install: cx-Oracle 5.1.3

我不知道如何解决这个问题。

“找不到 Oracle 软件安装”如何解决这个问题?

【问题讨论】:

  • 您是否将 ORACLE_HOME/bin 添加到 PATH 以及库中?

标签: python oracle plone buildout cx-oracle


【解决方案1】:

遇到同样的问题,背景是:

echo $ORACLE_HOME
/usr/lib/oracle/12.1/client64

但是: 须藤环境 | grep ORACLE_HOME

什么都没有。

解决办法:

sudo visudo

然后添加一行:

Defaults env_keep += "ORACLE_HOME"

如发现here

【讨论】:

    【解决方案2】:

    您必须确保为运行 Plone 实例的用户设置了正确的环境变量。

    最好的方法是在构建配置中添加这些变量::

    [buildout]
    ...
    
    [instance]
    ...
    
    environment-vars =
        ...
        LD_LIBRARY_PATH /usr/lib/oracle/10.2.0.3/client64/lib
        ORACLE_HOME /usr/lib/oracle/10.2.0.3/client64
    

    (这是我在 CentOS 上安装的)

    【讨论】:

      猜你喜欢
      • 2012-10-25
      • 2012-12-14
      • 2012-10-23
      • 1970-01-01
      • 2012-12-14
      • 2019-05-29
      • 2011-10-04
      • 2021-09-13
      • 1970-01-01
      相关资源
      最近更新 更多