I'm using Mac OS for development. Now I'm developing an app using Blockcypher API. With Ruby on Rails, when I try to send money using the Gem, it always return this error
FFI::NotFoundError (Function 'OPENSSL_init_ssl' not found in [libssl.dylib])
Already try to upgrade or downgrade the OpenSSL version on my mac but nothing happend and it so frustating. My friend on linux doesn't get this error, work perfectly on his device. Has anyone ever got this error?
I had the same problem, after research for one day I found the solution for rvm ruby-2.7.2 version:
Install openssl version 1.1:
brew update & brew upgrade & brew install openssl#1.1
cd in your openssl lib folder in my case: /usr/local/opt/openssl#1.1/lib
copy files to /usr/lib
cd /usr/local/opt/openssl#1.1/lib
Copy the libssl.1.1.dylib file
sudo cp libssl.1.1.dylib libcrypto.1.1.dylib /usr/local/lib/
make softlink
sudo ln -s libssl.1.1.dylib libssl.dylib
sudo ln -s libcrypto.1.1.dylib libcrypto.dylib
Reinstall ruby with openssl version:
rvm reinstall 2.7.2 --with-openssl-dir=/usr/local/opt/openssl#1.1
References github issues, stackoverflow.
Has anyone managed to install Carthage on macOS 10.15 Catalina (Beta)?
I tried to install Carthage using HomeBrew:
brew install Carthage
I get the following error message:
Error: You are using macOS 10.15.
We do not provide support for this pre-release 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, as you are running this pre-release version.
Now, I do understand that there might be some issues, I am using these beta softwares on my secondary MacBook Pro, so no worries but I can't install it and any tips would be much appreciated.
The issue is expected
'Homebrew install fails under Catalina 10.15 #2807'
Mon Jun 10 08:32:38 IDT 2019
https://github.com/Carthage/Carthage/issues/2807
Suggested solution
To install build carthage from sources in master (commit that worked for me: e41076782bed7b3609a53f4662480058a65e9a4e)
Following instructions in https://github.com/Carthage/Carthage#installing-carthage to build from master you need to run this:
git clone --depth=1 "https://github.com/Carthage/Carthage.git" &&\
cd Carthage &&\
make install
I run these commands on macOS 10.15.4 Catalina and worked for me.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
sudo chown -R $(whoami) /usr/local/*
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install carthage
So the issue seems to be Homebrew for some reason.
The solution I found is to use the GUI installer from the releases page. Before you build any frameworks, make sure to switch to the Xcode you're currently using.
If you are using Xcode 11 (beta), run this in terminal:
sudo xcode-select --switch /Applications/Xcode-beta.app
and for Xcode 10 (current)*
sudo xcode-select --switch /Applications/Xcode.app
Hope this helps!
Im trying to install Homebrew on a fresh install of MacOS Mojave 10.14 beta.
Yet after running /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" (this is from https://brew.sh)
I am getting the error,
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Failed during: /usr/bin/sudo /usr/bin/xcode-select --install
I have both the current command line tools from Xcode 9.4 and the beta command line tools for Xcode 10.0 beta.
Is there currently any workaround to allow me to install Homebrew?
I believe the problem is that the Command Line Tools for Xcode 10 do not install headers in /usr/include, but the install script checks there:
https://github.com/Homebrew/install/blob/bbf4a3a8b247c7dba159c3d557cc3853dd764171/install#L110
Thankfully, the code that tries to run xcode-select --install is bypassed if STDIN is not a TTY. Try adding a 0<&- after the install command to close STDIN and skip this command. I just tried it and it worked for me.
As an aside, Homebrew does not officially support 10.14 yet, and the maintainers do not want you to file issues about any problems you find. (Pull requests seem welcome, though.) Unfortunately this means that the Homebrew issue tracker is not a place to discuss problems and solutions.
I am doing some Rails programming and I consistently see Homebrew referenced in solutions around the web but have never used it.
I also notice Homebrew in the terminal version 2.9 as an option next to "Shell -> New" from the terminal drop down but when I select homebrew and issue commands, they fail.
Usually with the "command not found" error.
Strangely enough I have been unable to locate a simple command to determine whether brew is installed or not.
How do I check to see if Homebrew is already installed on my Mac?
brew help. If brew is there, you get output. If not, you get 'command not found'. If you need to check in a script, you can work out how to redirect output and check $?.
I use this to perform update or install:
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
fi
The standard way of figuring out if something is installed is to use which.
If Brew is installed.
>>> which brew
/usr/local/bin/brew
If Brew is not installed.
>>> which brew
brew not found
Note: The "not installed" message depends on your shell. zsh is shown above. bash will just not print anything. csh will say brew: Command not found. In the "installed" case, all shells will print the path.)
It works with all command line programs. Try which grep or which python. Since it tells you the program that you're running, it's helpful when debugging as well.
While which is the most common way of checking if a program is installed, it will tell you a program is installed ONLY if it's in the $PATH. So if your program is installed, but the $PATH wasn't updated for whatever reason*, which will tell you the program isn't installed.
(*One example scenario is changing from Bash to Zshell and ~/.zshrc not having the old $PATH from ~/.bash_profile)
command -v foo is a better alternative to which foo. command -v brew will output nothing if Homebrew is not installed
command -v brew
Here's a sample script to check if Homebrew is installed, install it if it isn't, update if it is.
if [[ $(command -v brew) == "" ]]; then
echo "Installing Hombrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "Updating Homebrew"
brew update
fi
brew -v or brew --version does the trick!
I just type brew -v in terminal if you have it it will respond with the version number installed.
Location of the brew where it installed
which brew
version of home brew install
brew --version
[ ! -f "`which brew`" ] && echo "not installed"
Explaination: If brew is not installed run command after &&
brew doctor checks if Homebrew is installed and working properly.
use either the which or type built-in tools.
i.e.: which brew or type brew
Maybe your mac don't received the path
enter image description here
Run command below
eval "$(/opt/homebrew/bin/brew shellenv)"
And run to check that work
brew help
Beginners normally do, the homebrew --version which is wrong.
Do instead, brew --version. brew help works also. If these two commands are not executed, you don't have homebrew installed.
Another one possible way:
# Check if Ninja is installed
if ! which ninja > /dev/null
then
echo 'Ninja installation...'
brew install ninja
fi
In my case Mac OS High Sierra 10.13.6
brew -v
OutPut-
Homebrew 2.2.2
Homebrew/homebrew-core (git revision 71aa; last commit 2020-01-07)
Homebrew/homebrew-cask (git revision 84f00; last commit 2020-01-07)
Yes you can run which brew, but you may have it installed and it says it is not found if you are using zsh. You will need to add it to your .zshrc file.
I find it simple to use brew help command to find it is installed or not. There was a user guide on the homebrew download page.
If it is not installed then it will show 'command not found'
If you need to install homebrew then paste this on terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
jest write brew -v in terminal and if you have it , you will see there version number and the install date .
like this :
Homebrew 3.3.12
Homebrew/homebrew-core (git revision c3cacc9cd1d; last commit 2022-01-31)
Homebrew/homebrew-cask (git revision fb6ec06d8b; last commit 2022-01-31)
Once you install Homebrew, type command brew doctor in terminal.
If you get the following message:
Your system is ready to brew
then you are good to go and you have successfully installed homebrew.
If you get any warnings, you can try fixing it.
Another way to do it is using the "command" builtin tool
if [ "$(command -v brew)" ]; then
echo "command \"brew\" exists on system"
fi
in your terminal, do which brew and itll tell you where it was installed at within your computer, but itll only work in zsh not in bash.
Running Catalina 10.15.4 I ran the permissions command below to get brew to install
sudo chown -R $(whoami):admin /usr/local/* && sudo chmod -R g+rwx /usr/local/*
unknown7cd1c37eb7ca:local shoaibali$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
-e:67: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
-e:96: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
unknown7cd1c37eb7ca:local shoaibali$ ls
CONTRIBUTING.md foreman hw_mp_userdata
Library git libexec
PortDetect.log heroku opt
bin hw_mobile_userdata share
unknown7cd1c37eb7ca:local shoaibali$
I have some problems with my brew when I was trying to install ffmpeg. I think I did the immature thing (note - after hours of trying) of uninstalling brew (through some article i read online) and trying to reinstall it. But the above output comes in my terminal when I try to install brew again. How can it say Homebrew is already installed when clearly the Cellar file isn't there ?
I had the same issue.
There was no directory called., /usr/local/Cellar but brew installation kept reporting it is already installed.
I resolved the issue by doing the following.,
Step 1 : run
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
(It reported error and didn't run successfully., but I believe it did cleanup)
Step 2 : Being from Windows world., restarted the terminal
Step 3 : Ran again
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
It ran successfully.,
A simple
sudo rm -rf /usr/local/.git
fixed my problem and I could re-install brew
I tried this solution but running "brew cleanup" when the system doesn't detect brew is not possible XD
I came up with a possible solution... I've tried to install MacPort and also didn't installed well, but it seems to uninstall (somehow) brew, so I could reinstall it from scratch
And this time it works! So, maybe it helps somebody!
PS: I think my original problem was that I had internet connection problem when I installed Brew for the first time, and didn't installed well