LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Does Anyone have Precompiled Bash? (https://www.linuxquestions.org/questions/linux-software-2/does-anyone-have-precompiled-bash-4175653423/)

aliu0130 05-06-2019 06:30 AM

Does Anyone have Precompiled Bash?
 
I accidentally deleted most of /usr/local/bin by using rm -r the deleted files include bash. I have been looking out for solutions, but all of them require bash. Can someone send their copy of Bash (someone who's also using MacOS Mojave) to me? Any version can do. You don't need to send me the bash profile.
Thanks in advance!
(P.S. it isn't in /usr/bin)

wpeckham 05-06-2019 07:25 AM

Quote:

Originally Posted by aliu0130 (Post 5992166)
I accidentally deleted most of /usr/local/bin by using rm -r the deleted files include bash. I have been looking out for solutions, but all of them require bash. Can someone send their copy of Bash (someone who's also using MacOS Mojave) to me? Any version can do. You don't need to send me the bash profile.
Thanks in advance!
(P.S. it isn't in /usr/bin)

How about a little information please.
What version of what distribution are you running?
What hardware are you running on?

sevendogsbsd 05-06-2019 07:37 AM

I think OP is using a Mac and nuked /usr/local/bin. Pretty sure the bash binary on a Mac will not run in Linux but I could be wrong...

wpeckham 05-06-2019 07:42 AM

Quote:

Originally Posted by sevendogsbsd (Post 5992185)
I think OP is using a Mac and nuked /usr/local/bin. Pretty sure the bash binary on a Mac will not run in Linux but I could be wrong...

Does this MAC distribution not ahve a REPO from which he could re-install bash? (I am not a fruit machine user. The last time I ran an apple it was an Apple-IIe clone called the Franklin Ace 1000!)

syg00 05-06-2019 07:52 AM

Quote:

Originally Posted by wpeckham (Post 5992188)
The last time I ran an apple it was an Apple-IIe clone called the Franklin Ace 1000!)

You win .... :p

The only Apple I ever owned was a Newton. Still sits on my bookshelf to remind me never to waste more money on i-anything ...

sevendogsbsd 05-06-2019 07:53 AM

Not at all - Macs don't work that way - I believe a reinstall is in order. They are essentially just like windows in that the OS is only available from the install medium. They also aren't Linux based, but some sort of proprietary BSD so pretty sure a bash binary from Linux won't work.

Vanyel 05-06-2019 09:30 AM

If you're on a Mac you need to re-install the OS. That's how you get it back. It's easy and you won't lose your personal files and preferences.

You really DON'T want someone to just send you the file. That's a big invitation for someone sending you a malicious binary that you will likely never know is a trojan. Just fix it with a re-install.

Afterwards, you might want to consider installing Homebrew (https://brew.sh), which is a full Linux-style package manger for the Mac and get a more recent version of BASH, as well as access to all kinds of other packages for the command line.

fatmac 05-06-2019 10:45 AM

MacOS is a version of FreeBSD with the Aqua desktop, if memory serves me right, so it would be a FreeBSD bash that would be required, but as has been said, just re install, we all learned by making mistakes. ;)

Vanyel 05-06-2019 01:06 PM

You should start making regular Time Machine backups as well. If you had them you could just restore the whole directory from there.

sevendogsbsd 05-06-2019 01:16 PM

Exactly - timemachine works very well, as far as a complete OS and data recovery tool anyway.

aliu0130 05-07-2019 05:22 AM

So how do I reinstall?
BTW I do have homebrew. I really like everything it offers like cask(though command-not-found didn't work)

aliu0130 05-07-2019 05:24 AM

Quote:

Originally Posted by sevendogsbsd (Post 5992185)
I think OP is using a Mac and nuked /usr/local/bin. Pretty sure the bash binary on a Mac will not run in Linux but I could be wrong...

Haha, "nuked" really made me laugh out loud there. Yep, I was trying to delete a folder I couldn't locate and accidentally "nuked" /usr/local/bin.

sevendogsbsd 05-07-2019 09:02 AM

Quote:

Originally Posted by aliu0130 (Post 5992497)
So how do I reinstall?
BTW I do have homebrew. I really like everything it offers like cask(though command-not-found didn't work)

If you have a timemachine backup, you can recover from that. If not, you'll have to do a complete OS install from CD or however Apple does it now, maybe from their recovery partition. You will lose all data though. Tons of resources out there on how to do a fresh Mac OS install.

sevendogsbsd 05-07-2019 09:23 AM

Quote:

Originally Posted by fatmac (Post 5992255)
MacOS is a version of FreeBSD with the Aqua desktop, if memory serves me right, so it would be a FreeBSD bash that would be required, but as has been said, just re install, we all learned by making mistakes. ;)

Aqua is correct, just looked it up. Not using FreeBSD though, but another open source OS called "Darwin". https://en.wikipedia.org/wiki/Darwin_(operating_system).

Vanyel 05-08-2019 08:31 AM

Darwin is based on BSD but that's neither here nor there as that's only a base, with a LOT integrated into it. Like ingredients of a cake, not discrete OS and graphics layers. You can't just "grab a package". Time machine restore of the directory would be the thing, if he had the backups.

As for how to re-install, Google is your friend! How to reinstall macOS from macOS Recovery


All times are GMT -5. The time now is 12:19 PM.