Question

I installed RVM as regular user (non-root) but when it comes to install Ruby

rvm install ruby

I got this error:

xsma@ACS:~$ rvm install ruby
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/debian/7/i386/ruby-2.1.1.tar.bz2
Checking requirements for debian.
Installing requirements for debian.
Updating systemxsma password required for 'apt-get --quiet --yes update': 
xsma password required for 'apt-get --quiet --yes update': 
....
Error running 'requirements_debian_update_system ruby-2.1.1',
showing last 15 lines of /home/xsma/.rvm/log/1397842665_ruby-2.1.1/update_system.log
++ missing_paths+=:/usr/sbin
++ for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ [[ -d /usr/local/sbin ]]
++ [[ ! :/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/xsma/.rvm/bin: =~ :/usr/local/sbin: ]]
++ missing_paths+=:/usr/local/sbin
++ [[ -n :/sbin:/usr/sbin:/usr/local/sbin ]]
++ command_to_run=(/usr/bin/env PATH="${PATH}${missing_paths}" "${command_to_run[@]}")
++ command_to_run=(${sudo_path}sudo -p "%p password required for '$*': " "${command_to_run[@]}")
++ sudo -p '%p password required for '\''apt-get --quiet --yes update'\'': ' /usr/bin/env PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/xsma/.rvm/bin:/sbin:/usr/sbin:/usr/local/sbin apt-get --quiet --yes update
Sorry, try again.
Sorry, user xsma is not allowed to execute '/usr/bin/env PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/xsma/.rvm/bin:/sbin:/usr/sbin:/usr/local/sbin apt-get --quiet --yes update' as root on ACS.ACS.
++ return 1
++ typeset __ret=1
++ case ${__ret} in
++ return 1
Requirements installation failed with status: 1.
xsma@ACS:~$ 

before it was saying "xsma is not in the sudoers file. This incident will be reported. " and i solved it by adding xsmas in the sudoers file like this: "xsma ALL=(All:ALL) ALL" but it still comes out with another error: "Sorry, user xsma is not allowed to execute..." And i don't know how figure it out. please help!

Here is /etc/sudouers file:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    mail_badpass
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
xsma ALL=(All:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

when i execute groups i got only root

Was it helpful?

Solution 2

Finally i worked it out by restarting. it seems that the system needed a restart in order to use the new config properly.

OTHER TIPS

Maybe your user is not added to sudo correctly, try to write in sudoers like this:

xsma ALL=(ALL:ALL) ALL

and check if it works with "sudo -i" in console


So there are several ways you can solve this problem:

1) make sudo for your user
2) make aptitude update and aptitude upgrade with root rights (logged like root)

Try to read this, maybe this will help you to configure sudoers right https://wiki.debian.org/sudo

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top