2

I am trying to install cx_Oracle in redhat linux and facing below error. I have tried many ways, downgrading the python from 3.9 to 3.8, upgrading setuptools,... It is resolved it. Any suggestion will be helpful.

Collecting cx_Oracle
  Using cached cx_Oracle-8.3.0.tar.gz (363 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: cx_Oracle
  Building wheel for cx_Oracle (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cx_Oracle (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'cx_Oracle' extension
      creating build
      creating build/temp.linux-aarch64-cpython-38
      creating build/temp.linux-aarch64-cpython-38/odpi
      creating build/temp.linux-aarch64-cpython-38/odpi/src
      creating build/temp.linux-aarch64-cpython-38/src
      gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DCXO_BUILD_VERSION=8.3.0 -Iodpi/include -Iodpi/src -I/usr/include/python3.8 -c odpi/src/dpiConn.c -o build/temp.linux-aarch64-cpython-38/odpi/src/dpiConn.o
      /tmp/pip-build-env-zlrr4oab/overlay/lib/python3.8/site-packages/setuptools/config/expand.py:144: UserWarning: File '/tmp/pip-install-apbhk3ix/cx-oracle_0d4f0759bf0349f8bee939c5b9282345/README.md' cannot be found
        warnings.warn(f"File {path!r} cannot be found")
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cx_Oracle
Failed to build cx_Oracle
ERROR: Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects
Jim Macaulay
  • 4,709
  • 4
  • 28
  • 53
  • The error `command 'gcc' failed: No such file or directory` looks like it might have a clue .... – Christopher Jones May 22 '22 at 22:16
  • The most recent version of cx_Oracle, now called python-oracledb introduced [aarch64 packages](https://pypi.org/project/oracledb/#files) so you shouldn't need to compile at all - if you upgrade. See the [release announcement](https://cjones-oracle.medium.com/open-source-python-thin-driver-for-oracle-database-e82aac7ecf5a). – Christopher Jones Aug 29 '23 at 23:53

0 Answers0