warning: Insecure world writable dir /usr/local with JackOSX? - ruby

Recently, I updated all my gems, and received this message:
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr/local in PATH, mode 040777
What is the meaning of this?
I'm learning Ruby, and received this after running my Rails app:
$ gem update
or:
$ rails server
I ran:
$ brew doctor
and got this message:
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:
/usr/local/share/man/de
/usr/local/share/man/de/man1
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/jack.pc
Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
~/.nvm/v0.10.28/lib/node_modules/coffee-script/bin/
Warning: Some keg-only formula are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
`brew link <formula>` will cause other formulae to detect them during
the `./configure` step. This may cause problems when compiling those
other formulae.
Binaries provided by keg-only formulae may override system binaries
with other strange results.
You may wish to `brew unlink` these brews:
freetype
But for some reason that I don't know, if I do this, I have problems with TeXShop (I did this, and it returned to normal when I ran $ brew link freetype.)
So I ran:
$ brew update
$ brew doctor
and the problem persisted.
The jack installed is jackosx

Related

Can't install TBB using Homebrew on MacOS

I have been trying to install TBB using Homebrew on my MacOS Ventura Hackintosh (AMD) and I have been unable to even install anything using Homebrew. Here's the output of running brew install tbb sam#adsl ~ % brew install tbb Warning: No available formula with the name "tbb". ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps.
Any tips? Thanks!
Your brew installation seems corrupt.
Run these commands to resolve and fix issue:
% brew update
% brew upgrade
% brew doctor
Doctor can report a number of warnings:
Warning: You have unlinked kegs in your Cellar.
You may wish to link these or uninstall these.
Warning: /usr/bin occurs before /opt/homebrew/bin in your PATH.
You may wish to modify your PATH to put homebrew first.

Error installing php7.4 with brew on MacOS Sierra 10.12

I am trying to install php 7.4 on MacOS Sierra with
brew install php#7.4
After the warning saying macOS 10.12 is unsupported I get this error:
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory # rb_sysopen - configure
brew doctor say:
Warning: Some installed kegs have no formulae!
This means they were either deleted or installed with `brew diy`.
You should find replacements for the following formulae:
python#2
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
python#2
Warning: You are using macOS 10.12.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
Is there a way to solve this problem?
Steps to fix
First step, and most important (unless you have a very good reason not to) : Upgrade macOS to the latest available version for your hardware. See https://en.wikipedia.org/wiki/MacOS#Hardware_compatibility
Run brew link python#2
Run brew install php#7.4

Cannot install ruby-1.9.2 in Mac OSX 10.8.1 due to symlink error

First, I tried the common rvm install.
rvm install 1.9.2
However, the following error was shown:
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
Then I run
rvm requirements
and find these following part of output useful
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
This can live side by side with an existing Xcode 4.2+ install or Command Line Tools for Xcode.
so I tried:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
However, I got the following error
Warning: Could not link apple-gcc42. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link apple-gcc42'
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 23 seconds
kanitw:shell.venturelab.com kanitw$ brew link apple-gcc42
Linking /usr/local/Cellar/apple-gcc42/4.2.1-5666.3... Warning: Could not link apple-gcc42. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/include/gcc
/usr/local/include is not writable. You should change its permissions.
What would be my best solution? I kinda remember from somewhere that I should not use sudo with brew since I will mess up the whole installation.
You can change /usr/local directory owner
sudo chown -R `whoami` /usr/local
But, if you have mysql installed, you mast fix its owner
sudo chown -R mysql:mysql /usr/local/mysql
You should run brew doctor and then change the permissions accordingly. There might be other issues.
Change the permissions of your /usr/local directory and try again.

Graphviz and Brew doctor - Unexpected dylibs error

Just did a brew install graphviz on Mountain Lion which gave me this error
Error: Failed executing: make install (graphviz.rb:47)
Thought I'd just uninstall it, so ran brew uninstall graphviz but got
Error: No such keg: /usr/local/Cellar/graphviz
Then thought I'd try brew doctor, but it gives me this error:
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libcdt.5.dylib /usr/local/lib/libcgraph.6.dylib /usr/local/lib/libgvc.6.dylib /usr/local/lib/libgvpr.2.dylib /usr/local/lib/libpathplan.4.dylib /usr/local/lib/libxdot.4.dylib
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/libcdt.pc /usr/local/lib/pkgconfig/libcgraph.pc /usr/local/lib/pkgconfig/libgvc.pc /usr/local/lib/pkgconfig/libgvpr.pc /usr/local/lib/pkgconfig/libpathplan.pc /usr/local/lib/pkgconfig/libxdot.pc
Any ideas how to fix this?
Try running these:
brew install libtool
Then try reinstalling graphviz.
And then check this out:
xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion

OS X Mountain Lion: gcc-4.2 No such file or directory

Tried to install a gem on Mountain Lion and make couldn't find gcc-4.2:
kamil$ gem install posix-spawn -v '0.3.6'
Building native extensions. This could take a while...
ERROR: Error installing posix-spawn:
ERROR: Failed to build gem native extension.
/Users/kamil/.rbenv/versions/1.9.3-p0/bin/ruby extconf.rb
creating Makefile
make
compiling posix-spawn.c
make: gcc-4.2: No such file or directory
make: *** [posix-spawn.o] Error 1
If you have Xcode installed, gcc should be available. Check where it is with:
kamil$ which gcc
/usr/bin/gcc
Then make a user-land symbolic link from gcc-4.2 to plain gcc:
kamil$ sudo ln -s ~/bin/gcc /usr/bin/gcc-4.2
(Ensure the user-land bind folder is in your path via export PATH=...:$HOME/bin in your .bash_profile or .zshrc.)
Gem installed fine afterwards.
Install simply apple-gcc42 with brew. It generate gcc-4.2 .
brew install apple-gcc42
So we do not need symlinks, which apple update may remove.
Homebrew
As #Artur Bodera mentioned modern OSX will refuse to let you create the symlink in the systems /bin folder.
To avoid this simply create the symlink to your users bin folder
ln -s ~/bin/gcc /usr/bin/gcc-4.2
Don't forget to add the bin folder to your .zshrc or .bash_profile - e.g.
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$HOME/bin
I had a similar issue while installing a python pip package (building a wheel failed). I got the similar message:
unable to execute '/usr/bin/gcc-4.2': No such file or directory
error: command '/usr/bin/gcc-4.2' failed with exit status 1
Linking /usr/bin/gcc-4.2 to /usr/bin/gcc was not possible due to Apples System Integrity Protection (SIP), and linking it to /usr/local/bin/gcc-4.2 was not picked up by the wheel building process; it was still trying to use /usr/bin/gcc-4.2.
I was finally able to solve this by setting the CC variable in the terminal:
CC=/usr/bin/gcc
# Install your packages
pip install -r requirements.txt
PS : note that disabling SIP doesn't work, even with SIP disabled I wasn't able to create the /usr/bin/gcc-4.2 link.

Resources