{"id":287,"date":"2021-02-05T23:41:28","date_gmt":"2021-02-05T14:41:28","guid":{"rendered":"https:\/\/www.drassal.net\/wp\/?p=287"},"modified":"2021-02-05T23:41:28","modified_gmt":"2021-02-05T14:41:28","slug":"installing-macos-brew-without-sudo","status":"publish","type":"post","link":"https:\/\/www.drassal.net\/wp\/installing-macos-brew-without-sudo\/","title":{"rendered":"Installing MacOs brew without sudo"},"content":{"rendered":"<p>In trying to setup the proxmark3 environment I ran into a frustrating problem, it was setup to be installed with brew&#8230; oh no.<\/p>\n<p>My current MacOs version is MacOs BigSur 11.1, so this works with that version, Intel anyway, I don&#8217;t have an Apple silicon machine to test with, but it could require some tweaks to work.<\/p>\n<p>I have used brew before and I have always had issues with how it works and where it puts files, and the way that the brew developers were uploading analytics was kinda sneaky as in this post.<\/p>\n<p><a href=\"https:\/\/news.ycombinator.com\/item?id=11566720\" target=\"_blank\">https:\/\/news.ycombinator.com\/item?id=11566720<\/a><\/p>\n<p>Yeah this is a while ago, but, how the dev team of brew, being open source and all appealing to developers and the open source community would be a little sneaky about this was not cool. \u00a0Not to drag on this topic, but I really don&#8217;t think brew needs sudo access to my whole computer, just last month I completly wiped and reinstalled MacOs (latest version too) to rid myself of all the development &#8220;junk&#8221; that I just allowed to be installed anywhere&#8230; yeah development software will turn your computer\u00a0into a trash can of random files and\u00a0junk eventually if you don&#8217;t carefully watch it.<\/p>\n<p>According to brew itself it says it does not require sudo, but it STILL wants sudo access to install&#8230; meh.<\/p>\n<p>https:\/\/superuser.com\/questions\/655113\/understanding-homebrew-no-sudo-philosophy-and-questioning-faq<\/p>\n<p>Anyway, being forced into a corner to install brew to install the proxmark3 development tools I decided I would play it safe, I created a new non-admin user account called &#8220;proxmark3&#8221; to play it safe, and installed brew on that account without sudo with the following script, I had to modify it slightly though which I will explain here. \u00a0Original is below.<\/p>\n<p><a href=\"https:\/\/gist.github.com\/skyl\/36563a5be809e54dc139\" target=\"_blank\">https:\/\/gist.github.com\/skyl\/36563a5be809e54dc139<\/a><\/p>\n<p>I have zipped it up and archived it incase it disappears or changes. \u00a0I haven&#8217;t tested all possible setups, so you might need to install XCode or other support files before this will work correctly too.<\/p>\n<p><a href=\"https:\/\/www.drassal.net\/filestore\/brew_without_sudo_20210205.zip\" target=\"_blank\">https:\/\/www.drassal.net\/filestore\/brew_without_sudo_20210205.zip<\/a><\/p>\n<p>You will notice I blew away a couple if conditions, for some reason it was not detecting the macos version correctly so I just chose for it and deleted the if statements that checked for the macos version. \u00a0It will put the executeables under your hold folder in \/home\/proxmark3\/usr, etc. \u00a0For some reason the create directory fails so just make them yourself if you get an error.<\/p>\n<p>Also, with how I tweaked the script it defaults to \/home\/prosmark3 for the home directory, edit as necessary. \u00a0Set the execute permission using<\/p>\n<p>mkdir \/user\/proxmark3\/usr<br \/>\nmkdir \/user\/proxmark3\/usr\/local<br \/>\nchmod u+x install.rb<br \/>\n.\/install.rb<\/p>\n<p>After installation is done run the following command to get everything up to date. \u00a0We also need to set the path. \u00a0Remember to either set the path each time you open a terminal and want to use brew things, or put it somewhere to auto execute each time terminal opens. \u00a0I couldn&#8217;t get .bash_profile to work for me.<\/p>\n<p>PATH=&#8221;$PATH:\/Users\/proxmark3\/usr\/local\/bin&#8221;<br \/>\nbrew doctor<\/p>\n<p>This will take a while to run, after it finishes enjoy running brew without sudo!!!<\/p>\n<p>Back to playing with the proxmark3!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In trying to setup the proxmark3 environment I ran into a frustrating problem, it was setup to be installed with brew&#8230; oh no. My current MacOs version is MacOs BigSur 11.1, so this works with that version, Intel anyway, I don&#8217;t have an Apple silicon machine to test with, but it could require some tweaks to work. I have used brew before and I have always had issues with how it works and where it puts files, and the way that the brew developers were uploading analytics was kinda sneaky as in this post. https:\/\/news.ycombinator.com\/item?id=11566720 Yeah this is a while ago, but, how the dev team of brew, being open [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-macos"],"_links":{"self":[{"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/comments?post=287"}],"version-history":[{"count":2,"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/posts\/287\/revisions\/289"}],"wp:attachment":[{"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/categories?post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.drassal.net\/wp\/wp-json\/wp\/v2\/tags?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}