LoginSignup
5
4

More than 5 years have passed since last update.

sudo経由でrbenvを実行した時、”コマンドが見つかリません”と出たら?

Last updated at Posted at 2016-07-07

解決方法

1.

$ sudo visudo

2.
修正前

Defaults       secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"  

修正後

Defaults    secure_path = "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rbenv/bin:/usr/local/rbenv/shims"

のように変えてください。

結果

yoon@v157-7-198-205:~$ sudo rbenv install 2.3.1
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...
Installed ruby-2.3.1 to /home/yoon/.rbenv/versions/2.3.1
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4