System: macOS mojave 10.14.6
when I use brew install llvm, this error appears:
Error: cmake: undefined method `on_linux' for #<Class:0x00007f7f744bf6b8>
I happened to have a Mojave machine and re-did the installation process myself, and it works fine.
Here is what I did:
brew install llvm (I actually used brew reinstall llvm, since it is reinstall for me)
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile, brew version would be on your PATH
source ~/.bash_profile, apply the PATH change
The full installation log:
$ brew reinstall llvm
==> Downloading https://homebrew.bintray.com/bottles/llvm-10.0.0_3.moj
Already downloaded: /Users/rchen/Library/Caches/Homebrew/downloads/6d4c3816f98949b64550d4a36656b2661f8e5aeea36a90abbdbea68c8215b9a2--llvm-10.0.0_3.mojave.bottle.tar.gz
==> Reinstalling llvm
==> Pouring llvm-10.0.0_3.mojave.bottle.tar.gz
==> Caveats
To use the bundled libc++ please add the following LDFLAGS:
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
llvm is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have llvm first in your PATH run:
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/rchen/.bash_profile
For compilers to find llvm you may need to set:
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
==> Summary
🍺 /usr/local/Cellar/llvm/10.0.0_3: 7,055 files, 1GB
test log (after PATH change):
$ clang --version
clang version 10.0.0
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
Related
I am trying to install Kframework without success. I installed all the dependencies following instructions at https://github.com/kframework/k/tree/master#prerequisite-install-guide and updated the environment variables as suggested.
I have export PATH="~/z3-4.8.7-x64-osx-10.14.6/bin:$PATH" .
I am running:
brew uninstall kframework
brew uninstall z3, and uninstall the version installed outside of brew
brew clean && brew update && brew upgrade
brew install z3 kframework
Brew install kframework produces the following warning about Command Line Tools:
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
and eventually ends with
<<< ERROR!
143 org.kframework.utils.errorsystem.KEMException: [Error] Critical: Could not start z3 pr ocess (IOException: Cannot run program "z3": error=2, No such file or directory)(Even though my CLT are up to date and installed in the right place ).
My CommanLineTools seem legit. I have Xcode Version 11.3.1 (11C505),
and have installed CommanLineTools from a binary I downloaded from apple development site Command_Line_Tools_for_Xcode_11.3.1.dmg
Typing "xcode-select -p" gives
/Library/Developer/CommandLineTools
my z3 is : z3 -version
Z3 version 4.8.7 - 64 bit (binary downloaded from z3 website) .
I tried this also with Z3 version 4.8.12
Any advice appreciated.
I'm running to issue installing Ruby 2.0.0 on a new macbook with macOS Catalina (version 10.15.7). At first I installed Ruby with rvm which did not work. I figured out that it was because Catalina's default terminal is ZSH instead of Bash (https://gorails.com/setup/osx/10.15-catalina). I was able to install Ruby 2.6.3 with the instructions but the issue is that the project I'm currently working on was written in Ruby 2.0.0. I tried installing this version with rbenv install 2.0.0-p0 but I ran to the following errors:
ruby-build: using libyaml from homebrew
Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/vydoan/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2
Installing ruby-2.0.0-p0...
WARNING: ruby-2.0.0-p0 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (Mac OS X 10.15.7 using ruby-build 20201005)
Inspect or clean up the working tree at /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.0q3Cat
Results logged to /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.log
Last 10 log lines:
compiling cont.c
compiling ./enc/ascii.c
thread.c:928:27: error: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
tp->tv_usec = ts.tv_nsec / 1000;
~ ~~~~~~~~~~~^~~~~~
compiling ./enc/us_ascii.c
1 error generated.
make: *** [thread.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
I've tried doing the follow:
1.
brew tap homebrew/dupes
which gives me this error log
Error: homebrew/dupes was deprecated. This tap is now empty and all its contents were either deleted or migrated.
brew install gcc
rbenv install 2.0.0-p0
which gives me the same errors as above.
I've asked my team and found that another person also have issue with installing ruby on their new mac machines. The older mac didn't not have this problem. Was anyone able to successfully install Ruby 2.0.0 on the newer mac?
Hello I had numerous issues trying to install ruby 2.2.7 the project I work on has quiet a deprecated version of ruby necessary stated above now I ran into numerous problems they use rvm I could not install 2.2.7 using rvm I have however succeeded using rbenv the thing that ruins your experience is mainly the command line tools provided by Apple since in newer version it does not support compiling older ruby versions.
I also run the same version of MacOS :
Your best bet (since I've tried several days in a row to get my setup working installing ruby being the biggest blocker).Go to apple's developer site and download an older version of command line tools here and browse for 11.4.1(Before running the next steps make sure to purge previous attempts and ruby version managers and symlinks so it won't interfere with you next install and make your life hard).
Before downloading and installing it check your gcc -v remember that and install the command line tools you've downloaded and check it again to see if things went according to plan you should get something like:
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I haven't tried other versions but this one works afterwards go to rbenv official website install the tools add the shell scripts to your local .zshrc file (if you don't have one just create it).Besides adding what the guide says it ommits an important step you also need to add this to your .zshrc:
export PATH="$HOME/.rbenv/bin:$PATH"
Then you should just close and open the terminal and install the ruby version you need :
# list latest stable versions:
$ rbenv install -l
# list all local versions:
$ rbenv install -L
# install a Ruby version:
$ rbenv install 2.0.0-p247
Consult the docs as of how to use them globally or locally also if use is not working end all terminal windows and the process restart and it should work just okay.
!Important mentions is to not change the command line tools when compiling different ruby related version may break the setup (ignore brew messages to update command line tools when running brew doctor)!
In an effort to follow the steps posted here to get nokogiri working, I seem unable to link iconv properly.
When I run the command
brew link libiconv
I receive the following error:
Warning: Refusing to link macOS-provided software: libiconv
If you need to have libiconv first in your PATH run:
echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.bash_profile
For compilers to find libiconv you may need to set:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
export CPPFLAGS="-I/usr/local/opt/libiconv/include"
I've added the above paths to my bash profile, reloaded the terminal, restarted the terminal and even tried restarting the computer as well but the error still persists. I've also tried reinstalling libiconv but to no avail (see output below).
$ brew reinstall libiconv
==> Reinstalling libiconv
==> Downloading https://homebrew.bintray.com/bottles/libiconv-1.16.mojave.bottle.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/203933f4d9f3c2f0463012d85013a6c01bdb89fc4d435341315b4537de1dba78--libiconv-1.16.mojave.bottle.tar.gz
==> Pouring libiconv-1.16.mojave.bottle.tar.gz
==> Caveats
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have libiconv first in your PATH run:
echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.bash_profile
For compilers to find libiconv you may need to set:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
export CPPFLAGS="-I/usr/local/opt/libiconv/include"
==> Summary
🍺 /usr/local/Cellar/libiconv/1.16: 30 files, 2.4MB
libiconv is keg-only.
❯ brew info libiconv
libiconv: stable 1.16 (bottled) [keg-only]
Conversion library
https://www.gnu.org/software/libiconv/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libiconv.rb
==> Caveats
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
In the post link given by you, linking libiconv is unneeded. Cause only the real installation location is used but not the linked one. Just skip this link step and run following command,
# use the real installation location is not preferred, cause it will
# break you once the libiconv is upgraded to a new version
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.16
# you'd better pass the dir "/usr/local/opt/libiconv",
# which serves as a link to the real installation location.
gem install nokogiri -- --with-iconv-dir=/usr/local/opt/libiconv
I just installed Homebrew on Lion 10.7.5 (it did complain that it is not supported, so I am aware that this may be the reason). I tried to install pandoc, and apparently cryptonite is causing problems.
~ $ brew install pandoc
Warning: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Using the sandbox
==> Downloading https://hackage.haskell.org/package/pandoc-1.18/pandoc-1.18.tar.
Already downloaded: /Users/username/Library/Caches/Homebrew/pandoc-1.18.tar.gz
==> cabal sandbox init
==> cabal update
==> cabal install --jobs=4 --max-backjumps=100000 --only-dependencies --constrai
Last 15 lines from /Users/username/Library/Logs/Homebrew/pandoc/03.cabal:
Installed pandoc-types-1.17.0.4
Downloading texmath-0.8.6.7...
Configuring texmath-0.8.6.7...
Building texmath-0.8.6.7...
Installed texmath-0.8.6.7
cabal: Error: some packages failed to install:
connection-0.2.6 depends on cryptonite-0.20 which failed to install.
cryptonite-0.20 failed during the building phase. The exception was:
ExitFailure 1
http-client-tls-0.3.3 depends on cryptonite-0.20 which failed to install.
tls-1.3.8 depends on cryptonite-0.20 which failed to install.
x509-1.6.4 depends on cryptonite-0.20 which failed to install.
x509-store-1.6.2 depends on cryptonite-0.20 which failed to install.
x509-system-1.6.4 depends on cryptonite-0.20 which failed to install.
x509-validation-1.6.5 depends on cryptonite-0.20 which failed to install.
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues
Warning: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
I hope I can install pandoc on 10.7.5. This is a MBP early 2011 with 4 GB RAM. Newer versions run very slowly, so I'd prefer not to upgrade from Lion, unless I have to.
UPDATE: I ended up upgrading to Mavericks. Everything worked just fine (some hiccups, nothing major). Homebrew installed fine, then pandoc was installed with Homebrew and now everything is humming.
Inspired by https://discourse.brew.sh/t/how-to-install-old-version-of-a-formula, I found a workaround.
As Homebrew doesn't offer Pandoc < 2.0 anymore, we need to sneak it into the current formula like so:
$ cd "$(brew --repo homebrew/core)"
In Formula/pandoc.rb, replace the contents of url with https://hackage.haskell.org/package/pandoc-1.19.2.4/pandoc-1.19.2.4.tar.gz and the contents of sha256 with bbe08c1f7fcfea98b899f9956c04159d493a26f65d3350aa6579aa5b93203556
Now you can install Pandoc: $ brew install pandoc.
I am new to OSX while running
brew doctor
shows the following warnings.
Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.
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:
openssl
Is there anyway to solve the error without reinstalling OS?
I need to install ruby rails, it shows some errors while running
rails server
command. I think the problem is due to the above warnings.
thanks in advance
#Yahya, I ran into the same problem and managed to fix it after reading this thread: https://github.com/Homebrew/homebrew/issues/29989
I've tried both suggested solutions (reinstalling the essentials package vs copying only the install_name_tool binary) and both worked equally fine (I've given examples for each of them below)
Therefore for Yosemite systems I recommend the fast 'clone©' approach, where as for the Mavericks ones - the much slower package replacement.
Yosemite OS
First check the current version of install_name_tool
$ otool -L /usr/bin/install_name_tool
/usr/bin/install_name_tool
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
Now clone the Yosemite compatible binary from Github and replace the one in your /usr/bin folder:
$ git clone https://github.com/cinic/install-name-tool
Cloning into 'install-name-tool'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 3
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
$ sudo mv /usr/bin/install_name_tool /usr/bin/install_name_tool.orig
$ sudo cp install-name-tool/install_name_tool /usr/bin/
Finally check if the version is updated and if homebrew is fixed:
$ otool -L /usr/bin/install_name_tool
/usr/bin/install_name_tool:
/usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
$ brew doctor
Your system is ready to brew.
Finally
$ rm -fr install-name-tool/
$ sudo rm /usr/bin/install_name_tool.orig
Mavericks
Download the Mavericks installer from App store
$ open /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg
$ open /Volumes/OS\ X\ Install\ ESD/Packages/Essentials.pkg
After the package is installed, check if the brew doctor output.
If you are using Homebrew, it will often look for items you have and link them. It looks like it's done that with openssl. You have three options:
Uninstall and reinstall openssl
brew uninstall openssl
brew install openssl
Try upgrading openssl
brew update openssl
Or you can try unlinking openssl (though, only do this if you know where you openssl is)
brew unlink openssl
I also faced the same issue and would get the warning that "/usr/bin/install_name_tool" was outdated.
The problem is that Xcode's install_name_tool has been updated, while the one in the system is outdated.
This can be solved by copying Xcode's install_name_tool to the system.
Use this command :
sudo cp /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool /usr/bin/install_name_tool
install_name_tool should now be updated.