LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2019, 06:30 AM   #1
aliu0130
LQ Newbie
 
Registered: May 2019
Posts: 4

Rep: Reputation: Disabled
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)

Last edited by aliu0130; 05-06-2019 at 06:31 AM. Reason: added detail
 
Old 05-06-2019, 07:25 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by aliu0130 View Post
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?
 
Old 05-06-2019, 07:37 AM   #3
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
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...
 
Old 05-06-2019, 07:42 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by sevendogsbsd View Post
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!)
 
Old 05-06-2019, 07:52 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by wpeckham View Post
The last time I ran an apple it was an Apple-IIe clone called the Franklin Ace 1000!)
You win ....

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 ...
 
Old 05-06-2019, 07:53 AM   #6
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
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.
 
Old 05-06-2019, 09:30 AM   #7
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
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.
 
1 members found this post helpful.
Old 05-06-2019, 10:45 AM   #8
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,487

Rep: Reputation: Disabled
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.
 
Old 05-06-2019, 01:06 PM   #9
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
You should start making regular Time Machine backups as well. If you had them you could just restore the whole directory from there.
 
Old 05-06-2019, 01:16 PM   #10
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Exactly - timemachine works very well, as far as a complete OS and data recovery tool anyway.
 
Old 05-07-2019, 05:22 AM   #11
aliu0130
LQ Newbie
 
Registered: May 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
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)
 
Old 05-07-2019, 05:24 AM   #12
aliu0130
LQ Newbie
 
Registered: May 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sevendogsbsd View Post
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.
 
Old 05-07-2019, 09:02 AM   #13
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Quote:
Originally Posted by aliu0130 View Post
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.
 
Old 05-07-2019, 09:23 AM   #14
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Quote:
Originally Posted by fatmac View Post
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).
 
Old 05-08-2019, 08:31 AM   #15
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
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
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to download precompiled bash binaries, such as "time" and "top"? elinuxqs Linux - Newbie 12 11-14-2005 08:36 PM
Qt precompiled networkdevo Red Hat 1 08-30-2003 11:51 PM
i need precompiled phant0m Linux - Software 1 08-22-2003 08:31 AM
where can i get precompiled kernel modules? drcreep Linux - General 3 08-11-2003 09:41 AM
Slack precompiled binaries zeky Slackware 3 09-03-2002 11:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration