rbenv icon indicating copy to clipboard operation
rbenv copied to clipboard

"No package matching 'libjemalloc1' is available"

Open wintermoot opened this issue 3 years ago • 1 comments

Hi,

I am new to ansible and trying to automate the config of my ruby on rails dev environment.

following your most basic example in your documentation as a first test but getting an error about missing libjemalloc1 package.


webuser@hoth:~/ansible/deb1$ ansible-galaxy list
# /home/webuser/.ansible/roles
- zzet.rbenv, 3.6.0


webuser@hoth:~/ansible/deb1$ cat rbenv.yml
---

- hosts: web_servers
  gather_facts: true # https://github.com/zzet/ansible-rbenv-role/issues/37
  vars:
    rbenv:
      env: user
      version: v0.4.0
      default_ruby: 2.0.0-p353
      rubies:
      - version: 2.0.0-p353
      - version: 2.2.4
        env:
          RUBY_CONFIGURE_OPTS: "--enable-shared"
      - version: 2.3.4
        env:
          RUBY_CONFIGURE_OPTS: "--enable-shared --with-jemalloc"
    rbenv_extra_depends:
      - libjemalloc1
      - libjemalloc-dev
  roles:
    - role: zzet.rbenv
      rbenv_users:
        - webuser
webuser@hoth:~/ansible/deb1$
webuser@hoth:~/ansible/deb1$ ansible-playbook rbenv.yml

PLAY [web_servers] **************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
ok: [10.10.200.201]

TASK [zzet.rbenv : include env vars] ********************************************************************************************************************************************************************************************************
ok: [10.10.200.201]

TASK [zzet.rbenv : update apt cache] ********************************************************************************************************************************************************************************************************
ok: [10.10.200.201]

TASK [zzet.rbenv : install build depends] ***************************************************************************************************************************************************************************************************
ok: [10.10.200.201]

TASK [zzet.rbenv : install extra build depends] *********************************************************************************************************************************************************************************************
fatal: [10.10.200.201]: FAILED! => {"changed": false, "msg": "No package matching 'libjemalloc1' is available"}

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
10.10.200.201              : ok=4    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

webuser@hoth:~/ansible/deb1$

Thanks

Andy

wintermoot avatar Sep 14 '22 00:09 wintermoot

try this:

rbenv_extra_depends:
  - "{{ 'libjemalloc1' if ansible_distribution_release == 'bionic' else 'libjemalloc2' }}"
  - libjemalloc-dev

thom-nic avatar Jun 29 '23 13:06 thom-nic