LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Homebrew install (https://www.linuxquestions.org/questions/linux-newbie-8/homebrew-install-4175551180/)

SonnyBrakes 08-19-2015 03:11 PM

Homebrew install
 
I have uninstalled Homebrew and then reinstalled it using this line of code in the command line $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once installed successfully I am asked to run $ brew help
This is the line that's returned: -bash: /usr/local/bin/brew: /bin/sh^M: bad interpreter: No such file or directory

I am trying to install Homebrew.

How can I fix this?

suicidaleggroll 08-19-2015 03:31 PM

Looks like somebody screwed up and got some DOS line terminators in the file. You can fix that file with dos2unix, but I'm not sure how widespread the problem is.

as root:
Code:

dos2unix /usr/local/bin/brew
You may run into the same problem on other scripts that get called.

SonnyBrakes 08-19-2015 03:39 PM

dos2unix /usr/local/bin/brew
 
I've peaked inside the bin and brew is in there along with github meteor subl sublime git-lfs, no dos2unix file

suicidaleggroll 08-19-2015 03:40 PM

I don't follow...what's in /usr/local/bin/ doesn't matter, and dos2unix won't be there because that's not where it's installed. Did you try running the command I suggested? If it comes back with a "dos2unix: command not found" error then you'll need to install it using your distro's package manager.

SonnyBrakes 08-19-2015 04:17 PM

Which command did you suggest?

suicidaleggroll 08-19-2015 05:33 PM

It's in post #2, the dos2unix command.

SonnyBrakes 08-19-2015 05:38 PM

-bash: dos2unix: command not found

suicidaleggroll 08-19-2015 05:56 PM

Quote:

Originally Posted by SonnyBrakes (Post 5408155)
-bash: dos2unix: command not found

See above:

Quote:

Originally Posted by suicidaleggroll (Post 5408115)
If it comes back with a "dos2unix: command not found" error then you'll need to install it using your distro's package manager.



All times are GMT -5. The time now is 06:23 PM.