1
$ sudo su
sh: prompt_git: command not found

I get the following result on running sudo su. I've looked at https://stackoverflow.com/a/15398153/4095653 This is in relation to the question: How can I install Jekyll on OSX 10.11?

Community
  • 1
  • 1
lenignes
  • 333
  • 1
  • 5
  • 17
  • You changed users, so instead of looking for prompt_git or whatever in your user's directories, you're telling bash to look in root's directories. – a p Jul 22 '15 at 19:23
  • 1
    Try `sudo su -` or `sudo -i`? – Etan Reisner Jul 22 '15 at 19:29
  • You rarely need to be root forever. Consider running `sudo ` instead of logging in as root. It's slightly inconvenient in the case of multiple arbitrary commands, but all implementations of `sudo` that I've seen persists the authentication status for your session for a few minutes, which means you'll only have to type your password once in a while, rather than every invocation. – Palpatim Jul 22 '15 at 19:59
  • @Palpatim I'm trying to install Jekyll using `sudo gem install jekyll` but I get the error `ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/jekyll` http://stackoverflow.com/questions/31567029/how-can-i-install-jekyll-on-osx-10-11 Someone suggested I first run as root. – lenignes Jul 22 '15 at 20:06
  • Do you get the same error when you run `sudo su -` ? – Musannif Zahir Jul 23 '15 at 06:55
  • @MusannifZahir After I run `sudo su` and `sudo gem install jekyll` I get the same error : `ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/jekyll` – lenignes Jul 23 '15 at 09:11
  • @AkashSubramanian I meant adding the `-` after the `sudo su` command. Run `sudo su -` – Musannif Zahir Jul 23 '15 at 09:12
  • @MusannifZahir I tried `sudo su -` and `sudo -i` previously to no avail. – lenignes Jul 23 '15 at 09:16
  • @AkashSubramanian you'll have to check the permissions of `jekyll` / `/usr/local` - if it's giving permissions issues as root, it could be a directory not having execute permissions – Musannif Zahir Jul 23 '15 at 09:21
  • @MusannifZahir I just checked my `bin` and `local` have root and execute permissions set – lenignes Jul 23 '15 at 09:51

0 Answers0