wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz
tar zxvf ruby-1.9.3-p448.tar.gz
cd ruby-1.9.3-p448/
./configure
make
sudo make install
若使用帳號沒有sudo權限,會出現以下的錯誤。
錯誤訊息:
"XXX is not in the sudoers file. This incident will be reported.
原因:
XXX帳號沒有權限用sudo切換。
修改方式:
1.輸入su - 切換到root帳號,並輸入root密碼。
2.輸入chmod u+w /etc/sudoers,具有寫入的權限。
3.輸入vim /etc/sudoers,開始修改 /etc/sudoers檔案。
4.找出root ALL=(ALL) ALL
5.在root ALL=(ALL) ALL 下面按 i 進行編輯,加上XXX ALL=(ALL) ALL
6.按Esc退出編輯,輸入:wq 儲存並退出檔案。
7.輸入chmod u-w /etc/sudoers,撤銷寫入的權限。
沒有留言:
張貼留言