epfl-si / ansible.suitcase

The Ansible suitcase: install Ansible, Keybase and EYAML into your project's temp dir
6 stars 1 forks source link

[bug] Ruby and gem installation errors #1

Closed ponsfrilus closed 4 years ago

ponsfrilus commented 4 years ago
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8386  100  8386    0     0  19731      0 --:--:-- --:--:-- --:--:-- 19731
+ : 3.7.7
+ : 2.9.6
+ : 2.6.3
+ : 3.2.0
+ set -e
+ satisfied=
+ unsatisfied=
+ shims
+ which git
+ main
+ '[' -n /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache ']'
+ ensure_dir /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache
+ '[' -d /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache ']'
+ '[' '!' -f /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp ']'
+ ensure_pip
+ ensure_python
+ local targetdir=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python
+ '[' '!' -x /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python/bin/python ']'
++ sed 's/Python //'
++ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python/bin/python --version
+ check_version python 3.7.7
+ local software=python
+ local version=3.7.7
+ case "$version" in
+ satisfied python 3.7.7
+ satisfied=' python'
+ '[' -n 3.7.7 ']'
+ record_version python 3.7.7
++ echo python
++ tr a-z A-Z
+ local version_key=PYTHON_VERSION
+ local version_val=3.7.7
+ grep -v '^PYTHON_VERSION' /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -n 3.7.7 ']'
+ echo 'PYTHON_VERSION="3.7.7"'
+ mv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp.tmp /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ for dep in $SUITCASE_PIP_EXTRA
+ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python/bin/pip3 install requests
Collecting requests
  Downloading https://files.pythonhosted.org/packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whl (58kB)
     |████████████████████████████████| 61kB 567kB/s 
Collecting certifi>=2017.4.17 (from requests)
  Downloading https://files.pythonhosted.org/packages/98/99/def511020aa8f663d4a2cfaa38467539e864799289ff354569e339e375b1/certifi-2020.4.5.2-py2.py3-none-any.whl (157kB)
     |████████████████████████████████| 163kB 529kB/s 
Collecting idna<3,>=2.5 (from requests)
  Downloading https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl (58kB)
     |████████████████████████████████| 61kB 344kB/s 
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
  Downloading https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl (126kB)
     |████████████████████████████████| 133kB 543kB/s 
Collecting chardet<4,>=3.0.2 (from requests)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
     |████████████████████████████████| 143kB 528kB/s 
Installing collected packages: certifi, idna, urllib3, chardet, requests
Successfully installed certifi-2020.4.5.2 chardet-3.0.4 idna-2.9 requests-2.23.0 urllib3-1.25.9
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ satisfied pip-requests
+ satisfied=' python pip-requests'
+ '[' -n '' ']'
+ ensure_ansible
++ readlink /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible
+ '[' '!' -x ../python/bin/ansible -o
main: line 206: [: missing `]'
++ readlink /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-playbook
+ -x ../python/bin/ansible-playbook ']'
main: line 207: -x: command not found
+ ensure_python
+ local targetdir=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python
+ '[' '!' -x /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python/bin/python ']'
++ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python/bin/python --version
++ sed 's/Python //'
+ check_version python 3.7.7
+ local software=python
+ local version=3.7.7
+ case "$version" in
+ satisfied python 3.7.7
+ satisfied=' python pip-requests python'
+ '[' -n 3.7.7 ']'
+ record_version python 3.7.7
++ echo python
++ tr a-z A-Z
+ local version_key=PYTHON_VERSION
+ local version_val=3.7.7
+ grep -v '^PYTHON_VERSION' /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -n 3.7.7 ']'
+ echo 'PYTHON_VERSION="3.7.7"'
+ mv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp.tmp /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/python/bin/pip install ansible==2.9.6
Requirement already satisfied: ansible==2.9.6 in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (2.9.6)
Requirement already satisfied: jinja2 in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from ansible==2.9.6) (2.11.2)
Requirement already satisfied: PyYAML in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from ansible==2.9.6) (5.3.1)
Requirement already satisfied: cryptography in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from ansible==2.9.6) (2.9.2)
Requirement already satisfied: MarkupSafe>=0.23 in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from jinja2->ansible==2.9.6) (1.1.1)
Requirement already satisfied: six>=1.4.1 in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from cryptography->ansible==2.9.6) (1.15.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from cryptography->ansible==2.9.6) (1.14.0)
Requirement already satisfied: pycparser in ./ansible-deps-cache/pyenv/versions/3.7.7/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography->ansible==2.9.6) (2.20)
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ ensure_dir /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin
+ '[' -d /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin ']'
+ ensure_symlink ../python/bin/ansible /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/
+ local from=../python/bin/ansible
+ local to
+ case "$2" in
++ basename ../python/bin/ansible
+ to=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible
+ rm -f /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible
+ ln -s ../python/bin/ansible /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible
+ ensure_symlink ../python/bin/ansible-playbook /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/
+ local from=../python/bin/ansible-playbook
+ local to
+ case "$2" in
++ basename ../python/bin/ansible-playbook
+ to=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-playbook
+ rm -f /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-playbook
+ ln -s ../python/bin/ansible-playbook /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-playbook
+ ensure_symlink ../python/bin/ansible-galaxy /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/
+ local from=../python/bin/ansible-galaxy
+ local to
+ case "$2" in
++ basename ../python/bin/ansible-galaxy
+ to=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-galaxy
+ rm -f /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-galaxy
+ ln -s ../python/bin/ansible-galaxy /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-galaxy
++ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible --version
++ head -1
++ sed 's/ansible //'
+ check_version ansible 2.9.6
+ local software=ansible
+ local version=2.9.6
+ case "$version" in
+ satisfied ansible 2.9.6
+ satisfied=' python pip-requests python ansible'
+ '[' -n 2.9.6 ']'
+ record_version ansible 2.9.6
++ echo ansible
++ tr a-z A-Z
+ local version_key=ANSIBLE_VERSION
+ local version_val=2.9.6
+ grep -v '^ANSIBLE_VERSION' /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -n 2.9.6 ']'
+ echo 'ANSIBLE_VERSION="2.9.6"'
+ mv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp.tmp /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -z '' ']'
+ ensure_keybase
+ '[' -d /keybase ']'
+ satisfied keybase
+ satisfied=' python pip-requests python ansible keybase'
+ '[' -n '' ']'
+ return
+ ensure_eyaml
++ readlink /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/eyaml
+ '[' '!' -x ../ruby/bin/eyaml ']'
+ ensure_ruby
+ local version=2.6.3
+ local targetdir=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby
+ '[' '!' -x /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby/bin/ruby ']'
+ ensure_rbenv
+ local rbenv_root=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv
+ '[' '!' -d /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv ']'
++ set +x
+ check_version rbenv 1.1.2-30-gc879cb0
+ local software=rbenv
+ local version=1.1.2-30-gc879cb0
+ case "$version" in
+ satisfied rbenv 1.1.2-30-gc879cb0
+ satisfied=' python pip-requests python ansible keybase rbenv'
+ '[' -n 1.1.2-30-gc879cb0 ']'
+ record_version rbenv 1.1.2-30-gc879cb0
++ echo rbenv
++ tr a-z A-Z
+ local version_key=RBENV_VERSION
+ local version_val=1.1.2-30-gc879cb0
+ grep -v '^RBENV_VERSION' /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -n 1.1.2-30-gc879cb0 ']'
+ echo 'RBENV_VERSION="1.1.2-30-gc879cb0"'
+ mv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp.tmp /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ local rbenv_version_dir=rbenv/versions/2.6.3
+ '[' '!' -d /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv/versions/2.6.3 ']'
+ run_rbenv install 2.6.3
+ env RBENV_ROOT=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv/bin/rbenv install 2.6.3
Downloading ruby-2.6.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.bz2
Installing ruby-2.6.3...

BUILD FAILED (Ubuntu 20.04 using ruby-build 20200520-4-g9b7acf6)

Inspect or clean up the working tree at /tmp/ruby-build.20200611173400.63800.D8kZkq
Results logged to /tmp/ruby-build.20200611173400.63800.log

Last 10 log lines:
installing capi-docs:               /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv/versions/2.6.3/share/doc/ruby
The Ruby readline extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libreadline-dev` to fetch missing dependencies.

Configure options used:
  --prefix=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv/versions/2.6.3
  --enable-shared
  LDFLAGS=-L/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv/versions/2.6.3/lib 
  CPPFLAGS=-I/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/rbenv/versions/2.6.3/include 
+ ensure_symlink rbenv/versions/2.6.3 /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby
+ local from=rbenv/versions/2.6.3
+ local to
+ case "$2" in
+ to=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby
+ rm -f /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby
+ ln -s rbenv/versions/2.6.3 /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby
++ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby/bin/ruby --version
main: line 247: /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby/bin/ruby: No such file or directory
++ cut '-d ' -f2
+ check_version ruby ''
+ local software=ruby
+ local version=
+ case "$version" in
+ unsatisfied ruby
+ unsatisfied=' ruby'
+ record_version ruby
++ echo ruby
++ tr a-z A-Z
+ local version_key=RUBY_VERSION
+ local version_val=
+ grep -v '^RUBY_VERSION' /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -n '' ']'
+ mv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp.tmp /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby/bin/gem install hiera-eyaml -v 3.2.0
main: line 254: /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/ruby/bin/gem: No such file or directory
+ ensure_symlink ../ruby/bin/eyaml /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/
+ local from=../ruby/bin/eyaml
+ local to
+ case "$2" in
++ basename ../ruby/bin/eyaml
+ to=/home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/eyaml
+ rm -f /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/eyaml
+ ln -s ../ruby/bin/eyaml /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/eyaml
++ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/eyaml --version
++ sed -n 's/Welcome to eyaml \([a-z0-9.-]*\).*/\1/p'
main: line 258: /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/eyaml: No such file or directory
+ check_version eyaml ''
+ local software=eyaml
+ local version=
+ case "$version" in
+ unsatisfied eyaml
+ unsatisfied=' ruby eyaml'
+ record_version eyaml
++ echo eyaml
++ tr a-z A-Z
+ local version_key=EYAML_VERSION
+ local version_val=
+ grep -v '^EYAML_VERSION' /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ '[' -n '' ']'
+ mv /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp.tmp /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/.versions.tmp
+ case "$satisfied" in
+ '[' -n requirements.yml ']'
+ ensure_ansible_requirements requirements.yml
+ ensure_dir /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/roles
+ '[' -d /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/roles ']'
+ /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/bin/ansible-galaxy install -p /home/nborboen/Dev/fsd/wp-ops/ansible/ansible-deps-cache/roles -i -r requirements.yml
[WARNING]: - epfl_si.ansible_module_openshift (master) is already installed -
use --force to change version to unspecified
[WARNING]: - epfl_si.ansible_module_eyaml (master) is already installed - use
--force to change version to unspecified
+ case "$unsatisfied" in
+ exit 0
[WARNING]: Found both group and host with same name: test_www
[WARNING]: Found both group and host with same name: test_inside

Fixed with sudo apt-get install -y libreadline-dev