error: cannot locate an Oracle software installation

Massimo Variolo picture Massimo Variolo · Jul 22, 2014 · Viewed 8.8k times · Source

I'm working on Plone.

PRELUDE

I've installed:

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

and also cx_Oracle. I've tested the installations and it's all ok: db connection successfully.

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

THE PROBLEM

I've edited buildout.cfg as follows:

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

I receive this error:

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

I have no idea how to solve this.

"cannot locate an Oracle software installation" How to fix this?

Answer

ProfHase85 picture ProfHase85 · Nov 17, 2014

Got the same problem, background is:

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

But: sudo env | grep ORACLE_HOME

yields nothing.

The solution:

sudo visudo

Then add the line :

Defaults env_keep += "ORACLE_HOME"

As found here