Homebrew install gdb with brewed python - homebrew

I had brewed version of python 2.7.6 installed on OS X mavericks and now am trying to install gdb with --with-brewed-python option.
But I am getting the following error message. Why it is checking python in /usr/local instead of /usr/local/bin? I think this is why it is failing. Anyone has any idea?
brew install gdb --with-brewed-python
==> Downloading http://ftpmirror.gnu.org/gdb/gdb-7.6.2.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/gdb/7.6.2 --with-system-readline --with-python=/usr/local
==> make
checking whether to use python... /usr/local
checking for python2.7... no
configure: error: no usable python found at /usr/local
make[1]: *** [configure-gdb] Error 1
make: *** [all] Error 2
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-dupes/issues

try: brew -v install --with-brewed-python gdb
https://github.com/Homebrew/homebrew-dupes/issues/277

Related

Install Ruby 2.0.0 on an old Mac OS 10.7.5 Lion

I have tried to upgrade the Ruby version on an old Mac I got, but without any success.
I know its possible because of this guy here asking how to upgrade from 2.2
Here is what I entered in the Terminal:
rvm install 2.0.0
Result:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.7/x86_64/ruby-2.0.0-p648.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system................
Installing required packages: coreutils.....There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
...
Error running 'requirements_osx_brew_libs_install coreutils',
please read /Users/DAN26/.rvm/log/1503823469_ruby-2.0.0-p648/package_install_coreutils.log
Requirements installation failed with status: 1.
Seems like "coreutils" is missing so I manage to install it by my self, however without success:
brew install coreutils
==> Downloading https://ftp.gnu.org/gnu/coreutils/coreutils-8.27.tar.xz
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils-8.27.tar.xz
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--patch-df9bedeae2ca6d335147b5b4c3f19db2f36ff8c84973fd15fe1697de70538247.diff
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--patch-f7e2b21f04085f589c3d10c2f6ac5a4185e2b907e8bdb5bb6e4f93888d7ab546.diff
==> Patching
==> Applying patch-m4_gnulib-comp.m4-add-renameat.diff
patching file m4/gnulib-comp.m4
==> Applying patch-lib_gnulib.mk-add-renameat.c.diff
patching file lib/gnulib.mk
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--renameat_c-8.27.c
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--renameat_m4-8.27.m4
==> autoreconf -fiv
==> ./configure --prefix=/usr/local/Cellar/coreutils/8.27 --program-prefix=g --without-gmp
==> make install
Last 15 lines from /Users/DAN26/Library/Logs/Homebrew/coreutils/03.make:
src/ginstall -c src/truncate '/usr/local/Cellar/coreutils/8.27/bin/./gtruncate'
src/ginstall -c src/tsort '/usr/local/Cellar/coreutils/8.27/bin/./gtsort'
src/ginstall -c src/tty '/usr/local/Cellar/coreutils/8.27/bin/./gtty'
src/ginstall -c src/uname '/usr/local/Cellar/coreutils/8.27/bin/./guname'
src/ginstall -c src/unexpand '/usr/local/Cellar/coreutils/8.27/bin/./gunexpand'
src/ginstall -c src/uniq '/usr/local/Cellar/coreutils/8.27/bin/./guniq'
src/ginstall -c src/unlink '/usr/local/Cellar/coreutils/8.27/bin/./gunlink'
src/ginstall -c src/vdir '/usr/local/Cellar/coreutils/8.27/bin/./gvdir'
src/ginstall -c src/wc '/usr/local/Cellar/coreutils/8.27/bin/./gwc'
src/ginstall -c src/whoami '/usr/local/Cellar/coreutils/8.27/bin/./gwhoami'
src/ginstall -c src/yes '/usr/local/Cellar/coreutils/8.27/bin/./gyes'
src/ginstall -c src/ginstall '/usr/local/Cellar/coreutils/8.27/bin'
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: 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.
Also I have tried to follow the steps for installing coreutils from source by this comment
wget https://ftpmirror.gnu.org/coreutils/coreutils-8.25.tar.xz
tar xJf coreutils-8.25.tar.xz
cd coreutils-8.25/
./configure --prefix=/usr/local
make
sudo make install
But after that retry to install Ruby 2.0.0 fail again for the same reason.
Can someone please help me to solve this problem?
Homebrew doesn’t support macOS 10.7. You can use Tigerbrew, a fork of Homebrew "that adds support for PowerPC Macs, and Macs running Tiger or Leopard" (quoting its homepage).

gem install nokogiri -v '1.5.11' failed due to make: /usr/local/bin/gmkdir: No such file or directory

Ruby version: 2.2.5
Mac OSX: 10.11.5
Gem version: 2.4.8
Bundler version: 1.12.5
When I run gem install nokogiri -v '1.5.11', I got the following error:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/hwpeng/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20160707-31800-1ejznjc.rb extconf.rb
====ignored multiple lines====
make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.-.nokogiri.time] Error 1
make install failed, exit code 2
I noticed the error message said: make: /usr/local/bin/gmkdir: No such file or directory.
I searched this in google and found a similar post but for cocopods: https://coderwall.com/p/ehijxg/fixing-error-installing-cocoapods-on-macos
The following commands solved my problem. If you have a different error message, please refer to http://www.nokogiri.org/tutorials/installing_nokogiri.html
Homebrew
brew install coreutils
gem install nokogiri -v '1.5.11'
MacPorts
sudo port install coreutils
gem install nokogiri -v '1.5.11'
I had this problem last time and you can try this code:
gem install nokogiri -v 1.5.11 -- --use-system-libraries
I think it will work.
The issue is not directly linked with the nokogiri. It is more around the missing libraries in the system. I am using Mac M1 machine and moving data/libraries from Intel to M1 is a pain. So for me after spending hours I fixed the issue. Steps which I followed to fix library issues are:
Uninstall and install Homebrew
Update the proper PATH in .zshrc or .bachrc file
install the coreutils brew install coreutils
close the terminal and then run the bundle install
Credit for coreutils help: http://thoughtsthatleakedout.blogspot.com/2011/10/problem-with-gmkdir-when-updating-gems.html

Ruby 'rails server' issue

Been getting an error everytime I try to run 'rails server'
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6
I have tried following the other tips such as bundle install and update but still same problem. Tried to rvm install 1.9.3 and got:
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required packages: gcc49.......
Error running 'requirements_osx_brew_libs_install gcc49',
showing last 15 lines of /Users/Quoc/.rvm/log/1457707600_ruby-1.9.3-p551/package_install_gcc49.log
++ case "$1" in
++ [[ -t 1 ]]
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.
Brew repair didnt work either.
EDIT: result from running brew install gcc46 --env=std
==> make bootstrap
Last 15 lines from /Users/Quoc/Library/Logs/Homebrew/gcc46/02.make:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateEnd", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateInit_", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_zError", referenced from:
_lto_end_compression in libbackend.a(lto-compress.o)
_lto_end_uncompression in libbackend.a(lto-compress.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [cc1] Error 1
rm gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
You have to install these dependences manually, try
brew install automake
if it gives you error of missing link of automake something like this
You must brew link autoconf before automake can be installed
then try these commands
brew link --overwrite --dry-run autoconf
brew link --overwrite autoconf
brew install automake
it will install automake and then you can try again to install ruby.
If it doesn't work you can try another thing:
Sol2:
brew install gcc46 --env=std
brew install gcc; brew install gcc46 --cc=gcc-4.9
Manually build GCC 4.6 outside of Homebrew, using the same configure switches
Also you can try with this :
$ brew install gcc
$ CC=/usr/local/bin/gcc-4.9 rvm install 1.9.1-p376 --enable-shared

OpenCv Install Trouble

I'm try to install openCV on my mac, but after running brew install opencv I get this error:
Devins-MacBook-Air:~ devinwieker$ brew install opencv
==> Installing opencv from homebrew/homebrew-science
==> Installing dependencies for opencv: gcc, readline, sqlite, gdbm, python, eigen, ilmbase,
==> Installing opencv dependency: gcc
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc-4.9.2.tar.bz2
==> ../configure --build=x86_64-apple-darwin13.4.0 --prefix=/usr/local/Cellar/gcc/4.9.2_1 --libdir=
==> make bootstrap
make[3]: *** [cc1plus] Error 1
rm gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
Anyone know what's going on?
I had the same problem I tried using "brew doctor" which you should definitely try, and if that was not helpful try updating Xcode and its developer tools.

Error installing TinyTDS on OSX 10.6 via gem install tiny_tds

I have been trying to install the TinyTDS gem on a Macbook with OSX 10.6. I was successful in installing Free TDS -- confirmed that it works via:
tsql -H SERVER -p 1433 -U username.
The error I'm getting from gem install tiny_tds is:
Building native extensions. This could take a while...
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
/Users/jason/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
-----
freetds is missing.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
I've tried specifying the TDS lib and include dirs (/usr/local/lib and /usr/local/include) without luck. I've tried reinstalling FreeTDS from source manually as well as via homebrew, but that made no difference.
I've seen a few similar issues posted, but they seem to reference an issue with locating iconv libraries which I appear to be moving beyond.
Any suggestions or references I may have overlooked? Thanks in advance.
Same problem on Ubuntu 14.04 resolved with:
sudo apt-get install freetds-dev
gem install tiny_tds
Log output:
Building native extensions. This could take a while...
/home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /mnt/datapart/david in PATH, mode 040777
Successfully installed tiny_tds-0.6.1
Parsing documentation for tiny_tds-0.6.1
Installing ri documentation for tiny_tds-0.6.1
Done installing documentation for tiny_tds after 0 seconds
1 gem installed
You need to install freetds with homebrew
brew update # always a good idea to update homebrew before installing anything!
brew install freetds
In my case, it seems the symlinks were not configured correctly, and using "brew link freetds" threw errors which required opening up some permissions. I tried just about everything else, and this is finally what worked:
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/doc/freetds/images
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/doc/freetds/reference
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/doc/freetds/userguide
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/man/man5
devMac:0.95.18 Me$ brew link --overwrite freetds
Linking /usr/local/Cellar/freetds/0.95.18... 2812 symlinks created
devMac:0.95.18 Me$ sudo gem install tiny_tds
Building native extensions. This could take a while...
Successfully installed tiny_tds-0.6.2
Parsing documentation for tiny_tds-0.6.2
Installing ri documentation for tiny_tds-0.6.2
Done installing documentation for tiny_tds after 0 seconds
1 gem installed
Disclaimer: I am in the early stages of learning this framework and do not have an understanding of the repercussions of using overwrite or changing these permissions.
In my case, installing Ruby 2.3.0 using brew install ruby worked. I got the idea from this question Cannot install tiny_tds on os.x 10.9.4.

Resources