I need some help

Hi, I run a macmini that I would like to run CertBot on. To do that, i need to install Homebrew.

When i try to install using the /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" it just hangs. I never goes any further, I have left it for hour and nothing happens. If i CTRL-C i get

^C-e:151:in system': Interrupt from -e:151:in `

I am running MacOSX 10.14.5 I have installed xcode and I am the only admin account. What am i doing wrong?

What does it say before it hangs?

Nothing. It does nothing. I hit enter and nothing happens.

Can you open https://raw.githubusercontent.com/Homebrew/install/master/install?

Yeah, I can open it. Shows me the ruby script.

I also tried saving the script to a .rb file and running it that way, same thing. It always pauses on line 151 which is to do with the script calling something with sudo. I have had a few issues with the sudo command on my macmini. I cant for life of me work out how to fix it.

Do you have antivirus running on your machine? Maybe that’s interacting with sudo? What happens when you run sudo echo "works"?

Goes to a new line, but doesn’t display anything. I don’t have an A/V on the server.sudo

What happens when you run which sudo?

It seems something in your system is breaking sudo. If you open the file /etc/hosts, does it contain something like this:

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost

Yep. Exactly that.host

None of this is homebrew related so I’m guessing a bit right now. What does sudo -h do?

Gives me the Help menu, as I would expect.

And yeah, I have come to that conclusion too, But i do appreciate the help if you have anything else to offer?

I’m running out of ideas, maybe https://askubuntu.com/questions/326194/sudo-hangs-without-prompting-for-password can help you?