RVM Install Error

Description of the issue

A few of our projects started to error out on our RVM step but we haven’t made any changes to this step and we haven’t changed the stack.

Environment:

Stacks Xcode 7.3.1 and 8.0

Build Step

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable

source /Users/vagrant/.rvm/scripts/rvm

brew update
rvm install ruby-2.2.2
rvm use 2.2.2

Build log

Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.2.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required custom packages: homebrew/dupes homebrew/dupes.
Installing required packages: zlib, autoconf, automake, coreutils, zlib, libyaml, readline..............
Error running 'requirements_osx_brew_libs_install zlib autoconf automake coreutils zlib libyaml readline',
showing last 15 lines of /Users/vagrant/.rvm/log/1484233433_ruby-2.2.2/package_install_zlib_autoconf_automake_coreutils_zlib_libyaml_readline.log
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Can you please include the whole step log section of “Searching for binary rubies, this might take some time.” ?

+------------------------------------------------------------------------------+
| (6) RVM                                                                      |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-01-12T07:03:00-08:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise701882890/step_src/._script_cont: line 3: gpg: command not found
Downloading https://github.com/rvm/rvm/archive/1.28.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc',
but no GPG software exists to validate it, skipping.

Installing RVM to /Users/vagrant/.rvm/
    Adding rvm PATH line to /Users/vagrant/.profile /Users/vagrant/.mkshrc /Users/vagrant/.bashrc /Users/vagrant/.zshrc.
    Adding rvm loading line to /Users/vagrant/.profile /Users/vagrant/.bash_profile /Users/vagrant/.zlogin.
Installation of RVM in /Users/vagrant/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/vagrant/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# Bitrise Bot,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: https://rvm.io/help and https://twitter.com/rvm_io
Updated 2 taps (caskroom/cask, homebrew/core).
==> New Formulae
bit
sqlparse
statik
==> Updated Formulae
ansible-cmdb
ant
antigen
app-engine-go-64
arangodb
aubio
autotrace
aws-sdk-cpp
beansdb
berkeley-db
bfg
bind
bitlbee
bitrise
blockhash
bogofilter
caf
carina
cattle
cdk
certbot
commandbox
conan
crystal-lang
darcs
darkice
datomic
dbhash
dbt
dbxml
dcmtk
diffoscope
dirt
docker-machine-parallels
doitlive
dwarfutils
ecl
euca2ools
fluent-bit
fontforge
fping
fq
geckodriver
geoipupdate
ghostscript
git-test
gnu-cobol
gnupg2
gnuradio
gnutls
go
godep
grafana
groonga
h2o
harfbuzz
heroku
icoutils
ievms
imagemagick
intercal
irssi
jack
javarepl
jdnssec-tools
jenkins
jigdo
kobalt
kubernetes-cli
leptonica
lft
libgit2
libgit2-glib
libgphoto2
libpng
libproxy
libsass
libspectre
libsvm
libtiff
lmdb
lrdf
ltc-tools
lz4
macvim
memcached
memcacheq
micropython
mikutter
minizip
mktorrent
moc
mongo-c-driver
mongodb
mono
mpd
msgpack
nexus
nim
node-build
node@4
node@6
notmuch
nss
nvc
nvi
open-cobol
openconnect
osc
osquery
pandoc
pbzip2
pcsc-lite
pev
pkcs11-helper
pod2man
pre-commit
prips
pstoedit
purescript
qjackctl
rancid
rocksdb
rpm
rswift
ruby-build
rust
serd
snort
sord
sourcekitten
sqldiff
sqlite
sqlite-analyzer
stern
stoken
swiftformat
syncthing
synfig
tbox
terraform
terragrunt
thefuck
thrift
u-boot-tools
udunits
vdirsyncer
vice
vim
webalizer
whatmp3
xmlrpc-c
yaz
you-get
youtube-dl
zabbix
zbar
zeromq
zplug
==> Deleted Formulae
dmtx-utils
gcc@6
qtplay
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.2.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required custom packages: homebrew/dupes homebrew/dupes.
Installing required packages: zlib, autoconf, automake, coreutils, zlib, libyaml, readline..............
Error running 'requirements_osx_brew_libs_install zlib autoconf automake coreutils zlib libyaml readline',
showing last 15 lines of /Users/vagrant/.rvm/log/1484233433_ruby-2.2.2/package_install_zlib_autoconf_automake_coreutils_zlib_libyaml_readline.log
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.
ruby-2.2.2 is not installed.
To install do: 'rvm install ruby-2.2.2'
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | RVM (exit code: 1)                                            | 61 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-script/issues             |
| Source: https://github.com/bitrise-io/steps-script                           |
+---+---------------------------------------------------------------+----------+

Can you please add this:

brew install zlib autoconf automake coreutils zlib libyaml readline

Before the source /Users/vagrant/.rvm/scripts/rvm line in your script?

I added the command but it is still failing with the same error

+------------------------------------------------------------------------------+
| (5) RVM                                                                      |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-01-12T07:43:23-08:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise782414027/step_src/._script_cont: line 3: gpg: command not found
Downloading https://github.com/rvm/rvm/archive/1.28.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc',
but no GPG software exists to validate it, skipping.

Installing RVM to /Users/vagrant/.rvm/
    Adding rvm PATH line to /Users/vagrant/.profile /Users/vagrant/.mkshrc /Users/vagrant/.bashrc /Users/vagrant/.zshrc.
    Adding rvm loading line to /Users/vagrant/.profile /Users/vagrant/.bash_profile /Users/vagrant/.zlogin.
Installation of RVM in /Users/vagrant/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/vagrant/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# Bitrise Bot,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: https://rvm.io/help and https://twitter.com/rvm_io
Error: No available formula with the name "zlib" 
==> Searching for similarly named formulae...
This similarly named formula was found:
lzlib
To install it, run:
  brew install lzlib
==> Searching taps...
This formula was found in a tap:
homebrew/dupes/zlib
To install it, run:
  brew install homebrew/dupes/zlib
Updated 2 taps (caskroom/cask, homebrew/core).
==> New Formulae
bit
sqlparse
statik
==> Updated Formulae
ansible-cmdb
ant
antigen
app-engine-go-64
arangodb
aubio
autotrace
aws-sdk-cpp
beansdb
berkeley-db
bfg
bind
bitlbee
bitrise
blockhash
bogofilter
caf
carina
cattle
cdk
certbot
commandbox
conan
crystal-lang
darcs
darkice
datomic
dbhash
dbt
dbxml
dcmtk
diffoscope
dirt
docker-machine-parallels
doitlive
dwarfutils
ecl
euca2ools
fluent-bit
fontforge
fping
fq
geckodriver
geoipupdate
ghostscript
git-test
gnu-cobol
gnupg2
gnuradio
gnutls
go
godep
grafana
groonga
h2o
harfbuzz
heroku
icoutils
ievms
imagemagick
intercal
irssi
jack
javarepl
jdnssec-tools
jenkins
jigdo
kobalt
kubernetes-cli
leptonica
lft
libgit2
libgit2-glib
libgphoto2
libpng
libproxy
libsass
libspectre
libsvm
libtiff
lmdb
lrdf
ltc-tools
lz4
macvim
memcached
memcacheq
micropython
mikutter
minizip
mktorrent
moc
mongo-c-driver
mongodb
mono
mpd
msgpack
nexus
nim
node-build
node@4
node@6
notmuch
nss
nvc
nvi
open-cobol
openconnect
osc
osquery
pandoc
pbzip2
pcsc-lite
pev
pkcs11-helper
pod2man
pre-commit
prips
pstoedit
purescript
qjackctl
rancid
rocksdb
rpm
rswift
ruby-build
rust
serd
snort
sord
sourcekitten
sqldiff
sqlite
sqlite-analyzer
stern
stoken
swiftformat
syncthing
synfig
tbox
terraform
terragrunt
thefuck
thrift
u-boot-tools
udunits
vdirsyncer
vice
vim
webalizer
whatmp3
xmlrpc-c
yaz
you-get
youtube-dl
zabbix
zbar
zeromq
zplug
==> Deleted Formulae
dmtx-utils
gcc@6
qtplay
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.2.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required custom packages: homebrew/dupes homebrew/dupes.
Installing required packages: zlib, autoconf, automake, pkg-config, coreutils, zlib, libyaml, readline, libksba........
Error running 'requirements_osx_brew_libs_install zlib autoconf automake pkg-config coreutils zlib libyaml readline libksba',
showing last 15 lines of /Users/vagrant/.rvm/log/1484235863_ruby-2.2.2/package_install_zlib_autoconf_automake_pkg-config_coreutils_zlib_libyaml_readline_libksba.log
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.
ruby-2.2.2 is not installed.
To install do: 'rvm install ruby-2.2.2'
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | RVM (exit code: 1)                                            | 74 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-script/issues             |
| Source: https://github.com/bitrise-io/steps-script                           |
+---+---------------------------------------------------------------+----------+

running the following before source /Users/vagrant/.rvm/scripts/rvm fixed the issue

brew install autoconf
brew install automake
brew install libtool
brew install apple-gcc42
brew install libyaml
brew install libxslt
brew install libksba
brew install openssl
1 Like

Great to hear, thanks for reporting! :slight_smile: