Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Mac install - homebrew refuses to run as root #559

Closed
bsyk opened this issue Nov 11, 2016 · 4 comments
Closed

Mac install - homebrew refuses to run as root #559

bsyk opened this issue Nov 11, 2016 · 4 comments

Comments

@bsyk
Copy link
Contributor

bsyk commented Nov 11, 2016

Following the install guide for OS X
The command ruby -e "$(curl -fsSL https://www.nativescript.org/setup/mac)" tries to run homebrew with sudo privileges, which is no longer supported. The install script halts at this point.

Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
@someshmukherjee
Copy link

I am facing the same issue. @bsyk - were you able to figure out a workaround?

@bsyk
Copy link
Contributor Author

bsyk commented Nov 16, 2016

I did not find a work around. I tried for a while with different ways of calling the script and editing the script, but gave up.
I got going with NativeScript by looking through the install script and manually running all the commands in my shell.
Going back through my bash history, these are the commands I used. Note: I already had xcode and homebrew installed:

brew cask install java
echo "export JAVA_HOME=$(/Library/Java/Home)" >> ~/.profile
brew install android-sdk
echo "export ANDROID_HOME=/usr/local/opt/android-sdk" >> ~/.profile
mkdir -p ~/.cocoapods
gem install xcodeproj -V
gem install cocoapods -V
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter platform-tools --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter tools --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter android-23 --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter build-tools-24.0.2 --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter build-tools-23.0.3 --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter extra-android-m2repository --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter extra-google-m2repository --all --no-ui
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter extra-intel-Hardware_Accelerated_Execution_Manager --all --no-ui
sudo /usr/local/opt/android-sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh 
echo y | /usr/local/opt/android-sdk/tools/android update sdk --filter sys-img-x86-android-23 --all --no-ui
echo no | /usr/local/opt/android-sdk/tools/android create avd -n Emulator-Api23-Default -t android-23 --abi default/x86 -c 12M -f
tns doctor

@NickIliev
Copy link
Contributor

NickIliev commented Mar 17, 2017

Related to NativeScript/nativescript-cli#2228

This issue is now resolved with updated commands from https://www.nativescript.org/setup/mac

@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants