oci-cli icon indicating copy to clipboard operation
oci-cli copied to clipboard

Error during installation

Open sjkhsl opened this issue 3 years ago • 5 comments

ubuntu20. 04 An error is reported during installation. How to solve it?

===> Currently supported optional packages are: ['db (will install cx_Oracle)'] What optional CLI packages would you like to be installed (comma separated names; press enter if you don't need any optional packages)?: -- The optional packages installed will be ''. -- Executing: ['', 'apt-get', 'update'] -- System was unable to use venv, is going to download and create virtualenv. -- Downloading virtualenv package from https://github.com/pypa/get-virtualenv/blob/20.6.0/public/virtualenv.pyz?raw=true. -- Downloaded virtualenv package to /tmp/tmpx4leus3o/virtualenv-20.6.0.pyz. -- Checksum of /tmp/tmpx4leus3o/virtualenv-20.6.0.pyz OK. -- Executing: ['/usr/bin/python3', 'virtualenv-20.6.0.pyz', '/root/lib/oracle-cli'] Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "virtualenv-20.6.0.pyz/main.py", line 168, in File "virtualenv-20.6.0.pyz/main.py", line 164, in run File "virtualenv-20.6.0.pyz/virtualenv/main.py", line 18, in run File "virtualenv-20.6.0.pyz/virtualenv/run/init.py", line 32, in cli_run File "virtualenv-20.6.0.pyz/virtualenv/run/session.py", line 46, in run File "virtualenv-20.6.0.pyz/virtualenv/run/session.py", line 53, in _create File "virtualenv-20.6.0.pyz/virtualenv/create/creator.py", line 171, in run File "virtualenv-20.6.0.pyz/virtualenv/create/via_global_ref/builtin/via_global_self_do.py", line 79, in create File "virtualenv-20.6.0.pyz/virtualenv/create/via_global_ref/builtin/via_global_self_do.py", line 104, in ensure_directories File "virtualenv-20.6.0.pyz/virtualenv/create/describe.py", line 29, in bin_dir File "virtualenv-20.6.0.pyz/virtualenv/create/describe.py", line 33, in script_dir File "virtualenv-20.6.0.pyz/virtualenv/discovery/py_info.py", line 125, in install_path File "virtualenv-20.6.0.pyz/virtualenv/discovery/py_info.py", line 125, in ValueError: too many values to unpack (expected 2) Traceback (most recent call last): File "/tmp/oci_cli_install_tmp_HKcx", line 257, in create_virtualenv install_python3_venv() File "/tmp/oci_cli_install_tmp_HKcx", line 204, in install_python3_venv exec_command(cmd) File "/tmp/oci_cli_install_tmp_HKcx", line 141, in exec_command subprocess.check_call(command_list, cwd=cwd, env=env) File "/usr/lib/python3.8/subprocess.py", line 359, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.8/subprocess.py", line 340, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.8/subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/tmp/oci_cli_install_tmp_HKcx", line 722, in main() File "/tmp/oci_cli_install_tmp_HKcx", line 668, in main create_virtualenv(tmp_dir, install_dir) File "/tmp/oci_cli_install_tmp_HKcx", line 271, in create_virtualenv download_and_create_virtualenv(tmp_dir, install_dir) File "/tmp/oci_cli_install_tmp_HKcx", line 196, in download_and_create_virtualenv exec_command(cmd, cwd=working_dir) File "/tmp/oci_cli_install_tmp_HKcx", line 141, in exec_command subprocess.check_call(command_list, cwd=cwd, env=env) File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/python3', 'virtualenv-20.6.0.pyz', '/root/lib/oracle-cli']' returned non-zero exit status 1.

sjkhsl avatar Jan 19 '22 05:01 sjkhsl

you can try apt remove python3 && apt autoremove and bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"

ghost avatar Jan 29 '22 08:01 ghost

same issue ,it still doesn't work and report the same error. Thanks!

6asd avatar Feb 06 '22 13:02 6asd

I had the same issue. Any workaround or solution for this one? Thank you!

anaemiliamachado avatar Mar 08 '22 19:03 anaemiliamachado

Debian 11.2 was getting an error on default install. The suggestion from above worked for me:

apt remove python3 && apt autoremove -y
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"

Mist-Hunter avatar Mar 25 '22 17:03 Mist-Hunter

I saw this in the Ubuntu 22.04 container. It seems to happen when you don't have the python3-pip package (and its gazillion dependencies) installed.

Rather than removing python3 and all of its dependencies (which could break other things you have installed), just install the python3-pip package and run the oci-cli installer again:

apt -y install python3-pip

cu avatar Apr 28 '22 05:04 cu

Closing the issue as we have made required changes in code for this issue.

pankajmjx avatar Jan 04 '23 12:01 pankajmjx