As someone brand new to programming, I am attempting to install Ruby using homebrew. The installation keeps getting stuck at the 'openssl' stage. This appears to be down to permissions on the directory:
/usr/local/etc/openssl/ Research on here and elsewhere online has pointed to attempting to install 'openssl' separately via Homebrew, which I have done and ended with the error:
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2e.yosemite.bot Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2e.yosemite.bottle.tar.gz ==> Pouring openssl-1.0.2e.yosemite.bottle.tar.gz Error: Permission denied - /usr/local/etc/openssl/certs Warning: Bottle installation failed: building from source. ==> Downloading https://www.openssl.org/source/openssl-1.0.2e.tar.gz Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2e.tar.gz ==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2e --openssldir=/usr ==> make depend ==> make ==> make test ==> make install MANDIR=/usr/local/Cellar/openssl/1.0.2e/share/man MANSUFFIX=ssl Last 15 lines from /Users/Joe/Library/Logs/Homebrew/openssl/05.make: SSL_want_read.3ssl => SSL_want.3ssl SSL_want_write.3ssl => SSL_want.3ssl SSL_want_x509_lookup.3ssl => SSL_want.3ssl installing man3/SSL_write.3ssl installing man3/d2i_SSL_SESSION.3ssl i2d_SSL_SESSION.3ssl => d2i_SSL_SESSION.3ssl installing man3/ssl.3ssl Cannot create directory /usr/local/etc/openssl/certs: Permission denied created directory `/usr/local/Cellar/openssl/1.0.2e/bin' created directory `/usr/local/Cellar/openssl/1.0.2e/lib' created directory `/usr/local/Cellar/openssl/1.0.2e/lib/engines' created directory `/usr/local/Cellar/openssl/1.0.2e/lib/pkgconfig' created directory `/usr/local/Cellar/openssl/1.0.2e/include' created directory `/usr/local/Cellar/openssl/1.0.2e/include/openssl' make: *** [install_sw] Error 13 So I used 'chown' to change the ownership of the /openssl/ directory and managed to get a little further but am now stuck with this error:
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2e.yosemite.bot Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2e.yosemite.bottle.tar.gz ==> Pouring openssl-1.0.2e.yosemite.bottle.tar.gz Error: Permission denied - /usr/local/etc/openssl/misc/c_hash Warning: Bottle installation failed: building from source. ==> Downloading https://www.openssl.org/source/openssl-1.0.2e.tar.gz Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2e.tar.gz ==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2e --openssldir=/usr ==> make depend ==> make ==> make test ==> make install MANDIR=/usr/local/Cellar/openssl/1.0.2e/share/man MANSUFFIX=ssl Last 15 lines from /Users/Joe/Library/Logs/Homebrew/openssl/05.make: *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ *) sfx=".bad";; \ esac; \ cp ${pfx}gost$sfx /usr/local/Cellar/openssl/1.0.2e/lib/engines/${pfx}gost$sfx.new; \ fi; \ chmod 555 /usr/local/Cellar/openssl/1.0.2e/lib/engines/${pfx}gost$sfx.new; \ mv -f /usr/local/Cellar/openssl/1.0.2e/lib/engines/${pfx}gost$sfx.new /usr/local/Cellar/openssl/1.0.2e/lib/engines/${pfx}gost$sfx; \ fi installing gost making install in apps... installing openssl installing CA.sh cp: /usr/local/etc/openssl/misc/CA.sh.new: Permission denied make[1]: *** [install] Error 1 make: *** [install_sw] Error 1 Again, to do with permissions on things in the openssl folder?
Does anyone know how to change this?
I guess the thing that has confused me MOST of all though is that I am the ONLY user on this computer and therefore the only admin as well, so I cannot get my head around why I would not have permission to access anything?
Two other things I have tried:
- Using sudo before my command
- Full reinstall of the OS X
Thanks for any help in advance.
brewmust be owned by root in order to run it as root. See this stackoverflow.com/questions/19039404/…