Moving /usr/local to ~/local

Joined
Jun 10, 2011
Messages
3
Reaction score
0
Points
1
Hi everyone!

Is it safe to move the /usr/local directory to ~/local? By "safe" I mean "will not break OSX itself". If some software stops working and needs to be installed again that would be fine. Of course I would also change the PATH environment variable.

I want to have it in my home directory so when I get the new Mac I can just migrate the user (without having to choose "Migrate all other files") and keep my ruby/ffmpeg/... installations.

Any advice would be appreciated :)
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
That's nuts. Why would you move it to a new location? Why not just copy it to the same location on the new computer? Connect the two by firewire with the old booted in Target Disk Mode and copy away. Or make a zip file of that folder and contents, store it in your user's Downloads folder, then extract back to the same path on the new computer.
 
Joined
Feb 26, 2010
Messages
2,116
Reaction score
123
Points
63
Location
Rocky Mountain High, Colorado
Your Mac's Specs
1.8 GHz i7 MBA 11" OSX 10.8.2
/usr/local is a standard unix location - you cannot just move it around. You will break something if you try and do this.

If it is just for ruby/ffmpeg - why not just install that on the New Mac? Much easier than messing with /usr/local - There are link libraries, headers, and what not that are linked in programs so if you move them - the programs won't be able to find those libraries and includes.

Final Advice - don't do it - you will break something.
 
OP
B
Joined
Jun 10, 2011
Messages
3
Reaction score
0
Points
1
Okay thank you, I'm glad I asked before trying.

It would have been nice though, because installing Ruby and Rails can be a pain, especially with MySQL for MAMP etc...but maybe copying over the /usr/local dir will keep it working.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
AFAIK, Rails is installed by default (and so is Ruby of course). Why not simply use that version and update it as needed using RubyGems? That would be much easier.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top