我已经修改了最后的/etc/profile脚本以自动加载rvmsudo siriproxy server,但是出现了一些奇怪的错误:
/etc/剖面图

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/pi/.rvm/bin:/home/pi/.rvm/gems/ruby-1.9.3-p194@SiriProxy/bin"
else
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/pi/.rvm/bin:/home/pi/.rvm/gems/ruby-1.9.3-p194@SiriProxy/bin"
fi
export PATH

if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

alias ls='ls --color'
cd ~/SiriProxy
rvmsudo siriproxy server

前两行是在设置ls颜色别名和目录更改的地方工作的。问题如下:
Last login: Fri Sep 28 11:42:44 2012 from 192.168.10.94
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- bundler (LoadError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:177:in `load_code'
        from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:84:in `run_server'
        from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:37:in `initialize'
        from bin/siriproxy:6:in `new'
        from bin/siriproxy:6:in `<main>'
pi@raspberrypi:~/SiriProxy$

它要做的是:
pi@raspberrypi:~/SiriProxy$ rvmsudo siriproxy server
Starting SiriProxy on port 443..

最佳答案

dowhich rvmsudo
修改/etc/profile以执行以下操作之一:
指定rvmsudo的绝对路径
包含路径上rvmsudo所在的目录。

关于linux - 在Raspbian/etc/profile脚本中找不到命令,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12632224/

10-15 13:31