"No such file or directory" when installing OCI CLI client

mdarwin

we are installing the OCI CLI client (v 2.6.8) into a Docker image using a Dockerfile.

The command is:

curl -L -o /tmp/install.sh https://raw.githubusercontent.com/oracle/oci-cli/2.6.8/scripts/install/install.sh
RUN chmod +x /tmp/install.sh
RUN /tmp/install.sh --accept-all-defaults

Weirdly this was working for some time before it started failing.

It is failing with the following error:

IOError: [Errno 2] No such file or directory: '/root/lib/oracle-cli/bin/bmcs'

There is a long output before that, which I will truncate for brevity:

13:11:02  [INFO] Downloading Oracle Cloud Infrastructure CLI install script from https://raw.githubusercontent.com/oracle/oci-cli/v2.5.15/scripts/install/install.py to /tmp/oci_cli_install_tmp_n1q6.
...
13:11:02  [INFO] Python3 not found on system PATH
13:11:02  [INFO] Running install script.
13:11:02  [INFO] python /tmp/oci_cli_install_tmp_n1q6  --accept-all-defaults
13:11:05  [INFO] Already using interpreter /usr/bin/python
13:11:05  [INFO] New python executable in /root/lib/oracle-cli/bin/python.   
13:11:05  [INFO] Installing setuptools, pip, wheel...
....
13:11:21  [INFO] Installing collected packages: idna, PyYAML, six, python-dateutil, configparser, enum34, pycparser, cffi, asn1crypto, ipaddress, cryptography, pyOpenSSL, pytz, certifi, oci, arrow, jmespath, terminaltables, click, retrying, oci-cli
13:11:28  [INFO] Successfully installed PyYAML-5.1.2 arrow-0.10.0 asn1crypto-1.2.0 certifi-2019.9.11 cffi-1.13.2 click-6.7 configparser-3.5.0 cryptography-2.4.2 enum34-1.1.6 idna-2.6 ipaddress-1.0.23 jmespath-0.9.3 oci-2.6.5 oci-cli-2.6.13 pyOpenSSL-18.0.0 pycparser-2.19 python-dateutil-2.7.3 pytz-2016.10 retrying-1.3.3 six-1.11.0 terminaltables-3.1.0
13:11:28  [INFO] -- Verifying Python version.
13:11:28  [INFO] -- Python version 2.7.5 okay.
13:11:28  [INFO] -- Creating directory '/root/lib/oracle-cli'.
13:11:28  [INFO] -- We will install at '/root/lib/oracle-cli'.
13:11:28  [INFO] -- Creating directory '/root/bin'.
13:11:28  [INFO] -- The executable will be in '/root/bin'.
13:11:28  [INFO] -- Creating directory '/root/bin/oci-cli-scripts'.
13:11:28  [INFO] -- The scripts will be in '/root/bin/oci-cli-scripts'.
13:11:28  [INFO] -- The optional packages installed will be ''.
13:11:28  [INFO] -- Downloading virtualenv package from https://github.com/pypa/virtualenv/archive/15.0.0.tar.gz.
13:11:28  [INFO] -- Downloaded virtualenv package to /tmp/tmpAuc0vV/15.0.0.tar.gz.
13:11:28  [INFO] -- Checksum of /tmp/tmpAuc0vV/15.0.0.tar.gz OK.
13:11:28  [INFO] -- Extracting '/tmp/tmpAuc0vV/15.0.0.tar.gz' to '/tmp/tmpAuc0vV'.
13:11:28  [INFO] -- Executing: ['/usr/bin/python', 'virtualenv.py', '--python', '/usr/bin/python', '/root/lib/oracle-cli']
13:11:28  [INFO] -- Executing: ['/root/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpAuc0vV', 'oci_cli', '--upgrade']
13:11:28  [INFO] Traceback (most recent call last):
13:11:28  [INFO]   File "/tmp/oci_cli_install_tmp_n1q6", line 661, in <module>
13:11:28  [INFO]     main()
13:11:28  [INFO]   File "/tmp/oci_cli_install_tmp_n1q6", line 631, in main
13:11:28  [INFO]     shutil.copyfile(os.path.join(install_dir, 'bin', BMCS_EXECUTABLE_NAME), bmcs_exec_path)
13:11:28  [INFO]   File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
13:11:28  [INFO] 
13:11:28  [INFO]     with open(src, 'rb') as fsrc:
13:11:28  [INFO] IOError: [Errno 2] No such file or directory: '/root/lib/oracle-cli/bin/bmcs'
mdarwin

The install script, despite being a particular version, pulls down the latest version of the python wheel.

This was visible in the log as follows:

13:33:17  [INFO] Collecting oci_cli
13:33:17  [INFO]   Downloading https://files.pythonhosted.org/packages/48/fb/eb97ba8f01fda78131513d0126985d6e6c482fac753b80e85a2bb01e3842/oci_cli-2.6.13-py2.py3-none-any.whl (5.8MB)

(Install script version = 2.6.8, downloaded python artifacts version 2.6.13).

So the reason this stopped working was that the python wheel was changed in a backwards-incompatible way.

The solution is to specify the version in the run command to the install script:

RUN /tmp/install.sh --accept-all-defaults --oci-cli-version 2.6.8

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

NoMethodError with Ruby when installing SoundCloud 2000 client for CLI

No such file or directory "limits.h" when installing Pillow on Alpine Linux

cl.exe' failed: No such file or directory when installing Scrapy

No such file or directory error when installing python package compound-split

Im getting an error "No such file or directory" when installing Composer Globally

No such file or directory error when installing github package in anaconda

bash: cd: linux: No such file or directory when installing zen kernel

How can I resolve the error oci runtime error: exec: no such file or directory when using docker run on Windows

Qt how use OCI driver without installing Oracle client

Error 'postgres.h: No such file or directory' when installing Apache AGE from the latest release

"cannot open mixer: No such file or directory" when trying to run alsamixer to unmute after installing Realtek audio driver

"Could not run curl-config: [Errno 2] No such file or directory" when installing pycurl

“Could not run curl-config: [Errno 2] No such file or directory” when installing pycurl on Alpine Linux

"fatal error: Eigen/Core: No such file or directory" when installing rpf package in rstudio

How to fix 'can't open file 'pip': [Errno 2] No such file or directory' when installing gekko

While installing hadoop, when I run start-dfs.sh command it shows 'no such file or directory found'

How to automate selections when installing via CLI

Errors when installing angular-cli

PIP warning when installing speedtest-cli

Installing CDH using Cloudera Manager: No such file or directory

Issues installing firebase tools, no such file or directory

`no such file or directory` While installing js beautify in npm

Finding and Installing Latest file in directory with specific extension

python - _mysql Cannot open include file: 'config-win.h': No such file or directory when installing mysql-python

ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory when installing tensor flow on Ubuntu 16.04.03

What path to use when installing PHP OCI8 Linux Centos 8

`aws` CLI returns "bad interpreter: No such file or directory"

CLI - How to select a file or directory with special encoding?

"No such file or directory" when invoking java