pyenv icon indicating copy to clipboard operation
pyenv copied to clipboard

Upgrade from 3.5.1 to 4.1.0, getting 'pyenv: cannot rehash'

Open lukeseawalker opened this issue 3 years ago • 0 comments

:ghost: Brief Description

I'm in the process to update from version 3.5.1 to version 4.1.0.

I have changed the pyenv_system_install and pyenv_user_install into a pyenv_install., see changes (https://github.com/aws/aws-parallelcluster-cookbook/pull/1540/files#diff-53bf5a2a42cec9c76aca73559c9e0ed134e5a7943145fbb68054dca759357d4dR18-R32)

During execution of pyenv_python I'm now getting

#19 929.2     * pyenv_python[3.9.9] action install[2022-09-26T12:18:30+00:00] INFO: Processing pyenv_python[3.9.9] action install (/etc/chef/local-mode-cache/cache/cookbooks/aws-parallelcluster-install/resources/install_pyenv.rb line 40)
#19 929.2 [2022-09-26T12:18:30+00:00] INFO: Building Python 3.9.9, this could take a while...
#19 929.2 
#19 929.2       * pyenv_script[pyenv install  3.9.9] action run[2022-09-26T12:18:30+00:00] INFO: Processing pyenv_script[pyenv install  3.9.9] action run (/etc/chef/local-mode-cache/cache/cookbooks/pyenv/resources/python.rb line 27)
#19 929.2 
#19 929.2         * execute[pyenv install  3.9.9] action run[2022-09-26T12:18:30+00:00] INFO: Processing execute[pyenv install  3.9.9] action run (/etc/chef/local-mode-cache/cache/cookbooks/pyenv/resources/script.rb line 42)
#19 929.2 
#19 929.2           [execute] pyenv: cannot rehash: /opt/parallelcluster/pyenv/shims isn't writable
#19 929.4                     Downloading Python-3.9.9.tar.xz...
#19 929.4                     -> https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz
#19 930.1                     
#19 930.1                     BUILD FAILED (CentOS 7.9.2009 using python-build 20180424)
#19 930.2                     
#19 930.2                     Inspect or clean up the working tree at /tmp/python-build.20220926121830.132214
#19 930.2                     Results logged to /tmp/python-build.20220926121830.132214.log
#19 930.2                     
#19 930.2                     Last 10 log lines:
#19 930.2                     /tmp/python-build.20220926121830.132214 /
#19 930.2                     mv: cannot move 'Python-3.9.9.tar.xz' to '/opt/parallelcluster/pyenv/cache/Python-3.9.9.tar.xz': Permission denied
#19 930.2                     ln: failed to create symbolic link 'Python-3.9.9.tar.xz': File exists
#19 930.2           
#19 930.2           ================================================================================
#19 930.2           Error executing action `run` on resource 'execute[pyenv install  3.9.9]'
#19 930.2           ================================================================================

Full log at https://github.com/aws/aws-parallelcluster-cookbook/actions/runs/3127440243/jobs/5074062828 and https://github.com/aws/aws-parallelcluster-cookbook/actions/runs/3127440233/jobs/5074062111

:pancakes: Cookbook version

4.1.0

:woman_cook: Chef-Infra Version

17.2.29

:tophat: Platform details

CentOS or Ubuntu

Steps To Reproduce

execute pyenv_install 'user' followed by a pyenv_python

:police_car: Expected behavior

It was working with version 3.5.1

:heavy_plus_sign: Additional context

n/a

lukeseawalker avatar Sep 26 '22 12:09 lukeseawalker