Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't install jruby on Ubuntu 16.04: no openjdk-7-jre-headless package #3719

Closed
codeforkjeff opened this issue Jul 15, 2016 · 0 comments
Closed

Comments

@codeforkjeff
Copy link

I ran:

rvm get head
rvm install jruby

And got this output:

Searching for binary rubies, this might take some time.
Found remote file https://s3.amazonaws.com/jruby.org/downloads/9.1.2.0/jruby-bin-9.1.2.0.tar.gz
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating systemjeffchiu password required for 'apt-get --quiet --yes update': ..-
..
Installing required packages: openjdk-7-jre-headless....
Error running 'requirements_debian_libs_install openjdk-7-jre-headless',
showing last 15 lines of /home/jeffchiu/.rvm/log/1468589813_jruby-9.1.2.0/package_install_openjdk-7-jre-headless.log
++ [[ -n '' ]]
++ command_to_run=(__rvm_sudo -p "%p password required for '$*': " "${command_to_run[@]}")
++ __rvm_sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install openjdk-7-jre-headless'\'': ' apt-get --no-install-recommends --yes install openjdk-7-jre-headless
++ command sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install openjdk-7-jre-headless'\'': ' apt-get --no-install-recommends --yes install openjdk-7-jre-headless
++ sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install openjdk-7-jre-headless'\'': ' apt-get --no-install-recommends --yes install openjdk-7-jre-headless
Reading package lists...
Building dependency tree...
Reading state information...
Package openjdk-7-jre-headless is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'openjdk-7-jre-headless' has no installation candidate
++ return 100
++ return 100

Ubuntu 16.04 ships with openjdk 8, so the package should be "openjdk-8-jre-headless". I edited .rvm/scripts/functions/requirements/ubuntu and changed requirements_debian_define_java() to read:

requirements_debian_define_java()
{
  update-alternatives --list ${1:-java} >/dev/null 2>&1 ||
    requirements_check_fallback \
      openjdk-8-jre-headless openjdk-8-jdk oracle-j2sdk1.8 \
      openjdk-7-jre-headless openjdk-7-jdk oracle-j2sdk1.7 \
      openjdk-6-jre-headless opendjk-6-jdk oracle-j2sdk1.6
}

which worked. I'm not sure if there are other modifications that should accompany this change.

raelgc added a commit that referenced this issue Jul 15, 2016
@pkuczynski pkuczynski modified the milestone: rvm-1.28.0 Nov 8, 2016
openstack-gerrit pushed a commit to openstack-infra/puppet-jenkins that referenced this issue May 12, 2017
Use 'puppet apply' to install jenkins in ubuntu-16.04 failed.
Need to upgrade the 'openjdk-8-jre-headless' package.
See rvm/rvm#3719

Change-Id: If31abd1d29416dbb567c0f76529913b8327d40c1
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue May 12, 2017
Project: openstack-infra/puppet-jenkins  3f2c0a65aa83d82070f9326eed9fad8d0eb0d869

use 'openjdk-8-jre-headless' for ubuntu-16.04

Use 'puppet apply' to install jenkins in ubuntu-16.04 failed.
Need to upgrade the 'openjdk-8-jre-headless' package.
See rvm/rvm#3719

Change-Id: If31abd1d29416dbb567c0f76529913b8327d40c1
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants