Closed archongtv closed 2 years ago
Hi @archongtv.
The group is created by the rvm
scripts, not by the deb package postinst script.
Just remember that you'll need to add your user to the rvm
group and you'll be part of the group only after a logout/login.
@raelgc
Same issue. How to create rvm group by rvm
scripts? I followed readme to install but fail at step sudo usermod -a -G rvm $USER
: usermod: group 'rvm' does not exist
I'm booting a 20.04 vm in order to investigate this issue.
After run sudo apt install rvm
this is my output:
Setting up rvm (1.29.12-1) ...
Creating group 'rvm'
Installing RVM to /usr/share/rvm/
Installation of RVM in /usr/share/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=r
wx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell w
indows.
* Please do NOT forget to add your users to the rvm group.
The installer no longer auto-adds root or users to the rvm group. Admins mu
st do this.
Also, please note that group memberships are ONLY evaluated at login time.
This means that users must log out then back in before group membership tak
es effect!
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: https://opencollective.com/rvm/donate
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
rael@rael-virtualbox:~$ sudo usermod -a -G rvm $USER
rael@rael-virtualbox:~$
Are you guys running standard Ubuntu 20.04?
Thanks for test, I found install via shell script may cause the issue (I am configuring a script to auto-install RVM in my workflow).
I tested on Ubuntu 20.04 and compared between manually installation and script installation. The Manually installation is ok but script failed.
My script:
set -e
export DEBIAN_FRONTEND="noninteractive"
apt-get update
apt-get install -y software-properties-common
apt-add-repository -y ppa:rael-gc/rvm
apt-get update
apt-get install -y rvm
usermod -a -G rvm $USER
Output:
...
Setting up rvm (1.29.12-1) ...
Installing RVM to /usr/share/rvm/
Adding rvm PATH line to /root/.profile /root/.mkshrc /root/.bashrc /root/.zshrc.
Adding rvm loading line to /root/.profile /root/.bash_profile /root/.zlogin.
Installation of RVM in /usr/share/rvm/ is almost complete:
* To start using RVM you need to run `source /usr/share/rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
* Please do NOT forget to add your users to the rvm group.
The installer no longer auto-adds root or users to the rvm group. Admins must do this.
Also, please note that group memberships are ONLY evaluated at login time.
This means that users must log out then back in before group membership takes effect!
* WARNING: version This account is currently not available. detected - Zsh 4.3.12 / 5.0.0+ is recommended,
with current one errors to be expected - bugs in shell code interpretation.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: https://opencollective.com/rvm/donate
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
usermod: group 'rvm' does not exist
Running into the same issue with Ubuntu and Docker. Tried both focal
and 18.04
tags as well.
FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive
# Install packages for releasing libraries.
RUN apt-get update && \
apt-get -y install curl libpq-dev git gpg zsh software-properties-common
RUN useradd -ms /bin/bash jenkins
RUN apt-add-repository -y ppa:rael-gc/rvm && \
apt-get update && \
apt-get install -y rvm
RUN usermod -a -G rvm jenkins
Docker build output:
Sending build context to Docker daemon 4.096kB
Step 1/13 : FROM ubuntu:focal
focal: Pulling from library/ubuntu
a39c84e173f0: Already exists
Digest: sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322
Status: Downloaded newer image for ubuntu:focal
---> d5ca7a445605
Step 2/13 : ARG BUNDLE_GEMS__SALSIFY__COM
---> Running in a039ad167f62
Removing intermediate container a039ad167f62
---> 06f8c4ae72a8
Step 3/13 : ARG DEBIAN_FRONTEND=noninteractive
---> Running in 927f00df716f
Removing intermediate container 927f00df716f
---> 77bcbc1f1f4a
Step 4/13 : ARG LIBRARY_RELEASE_TOOL_VERSION=0.2.1
---> Running in ad78b0e47923
Removing intermediate container ad78b0e47923
---> fff821c5cbe7
Step 5/13 : RUN apt-get update && apt-get -y install curl libpq-dev git gpg zsh software-properties-common
---> Running in 8c0f2e15ab66
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal/multiverse arm64 Packages [139 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages [1234 kB]
..................OMITTED.................
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/c++.1.gz because associated file /usr/share/man/man1/g++.1.gz (of link group c++) doesn't exist
Setting up rvm (1.29.12-1) ...
Installing RVM to /usr/share/rvm/
Adding rvm PATH line to /root/.profile /root/.mkshrc /root/.bashrc /root/.zshrc.
Adding rvm loading line to /root/.profile /root/.bash_profile /root/.zlogin.
Installation of RVM in /usr/share/rvm/ is almost complete:
* To start using RVM you need to run `source /usr/share/rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
* Please do NOT forget to add your users to the <code>rvm</code> group.
The installer no longer auto-adds root or users to the rvm group. Admins must do this.
Also, please note that group memberships are ONLY evaluated at login time.
This means that users must log out then back in before group membership takes effect!
<warn>Thanks for installing RVM 🙏</warn>
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: <code>https://opencollective.com/rvm/donate</code>
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Removing intermediate container 408859b2393d
---> be1b2ab07eb0
Step 8/13 : RUN usermod -a -G rvm jenkins
---> Running in 8d4871055848
usermod: group 'rvm' does not exist
The command '/bin/sh -c usermod -a -G rvm jenkins' returned a non-zero code: 6
Does this have something to do with the package being install by a root user? I do this same thing in an AMI for EC2 without issue.
@joshbranham Yes, it's related to the root
usage. And not related to the Ubuntu installer either. Probably you should open the same issue on rvm/rvm
.
when using PPA repository rvm group is not created in postinst.