I am trying to install proj4rb on a Mac Mavericks (gem install proj4rb) but get the
following error:
----- Error Message
checking for proj_api.h... yes
checking for pj_init() in -lproj... yes
creating Makefile
make
compiling projrb.c
projrb.c:2:22: error: projects.h: No such file or directory
----- End Error Message
I know the problem. It is requiring the header files which would be "libproj-dev" on linux.
I am new to mac so I wonder if somebody can help me out using either brew or macport.
To sum up, I need to install "libproj-dev" equivalent package for Mac.
Thanks.
You can install it via brew with
brew install proj
Related
I am trying to install gphoto2 on my macbook pro. I installed the tar.gz from their website and from terminal I cd Downloads and run ./configure as the README file recommends doing. I keep receiving this error:
checking for pkg-config... false
configure: error:
*** Build requires pkg-config
***
*** Possible solutions:
*** - set PKG_CONFIG to where your pkg-config is located
*** - set PATH to include the directory where pkg-config is installed
*** - get it from http://freedesktop.org/software/pkgconfig/ and install it
I have Xcode 6 installed, as well as Command Line tools (tested it by running gcc in terminal). What am I doing wrong? What should I do?
Also, should I install gphoto2 or libgphoto2?
I wouldn't bother faffing around with building it yourself. I would install homebrew from here.
Then you can simply do
brew install gphoto2
and you will also have a decent package manager if you want to install other cool stuff later on - e.g. ImageMagick, gawk, GNU sed, swatch, youtube-downloader, wxWidgets, vips, redis, sox, ffmpeg. To find other cool stuff that can be managed with homebrew just do
brew search
After messing up the permissions on my original OSX installation I decided to create a new partition with a new installation of Mavericks.
All's fine until I try to install ruby and get the error
/bin/sh: /Volumes/Macintosh: No such file or directory
"/Volumes/Macintosh" is a trimmed "/Volumes/Macintosh HD" which is where the original OSX installation is on the original partition. I assume it's still required for booting.
Why is the new installation on the new partition looking at the original when trying to install Ruby, and other things, and how do I stop it?
Any help would be greatly appreciated
Thanks, Steve
Update: Installing ruby using "rvm install 2.1" gives me the error -
Error running 'requirements_osx_brew_libs_install libksba', showing last 15 lines of
/Users/bigmac/.rvm/log/1394034844_ruby-2.1.1/package_install_libksba.log
==> Downloading ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/libksba-1.3.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/libksba/1.3.0
==> make install
Making install in m4
/bin/sh: /Volumes/Macintosh: No such file or directory
make: *** [install-recursive] Error 1
I ended up fixing my issue after installing homebrew and running brew doctor where it told me macports could cause some issues . ( I hadn't installed macports ) It was on the system from a previous version of OSX . By uninstalling macports I was able to successfully install ruby 2.1.1 .
If that doesn't work there is also an issue if your xcode command line tools are installed in a directory whose name has spaces in it. Apparently RVM can't install ruby if there are spaces.
Don't know if it will help but it worked for me
The solution I used was to fix my original installation permissions. I did this by restarting the Mac and holding down CMD-R then selecting Reinstall OS X following the instruction here:
http://support.apple.com/kb/PH13871
The [re]installation completely restored all permissions without affecting data. Problem solved.
I'm trying to install openCV 2.4.2 (not the newest version but stable version compatible with newer OS X according to several sources) on Mac OS X 10.9 (Mavericks). I have tried installing from source and using homebrew but neither works. I get the following error when I try installing it:
build Marieke$ make
[ 25%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.cpp:1:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.hpp:2:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts.hpp:40:
/users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts_gtest.h:1657:13: fatal error:
'tr1/tuple' file not found
# include <tr1/tuple> // NOLINT
^
1 error generated.
make[2]: *** [modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o] Error 1
make[1]: *** [modules/ts/CMakeFiles/opencv_ts.dir/all] Error 2
make: *** [all] Error 2
I don't know how to solve this and I have tried several things already (I do now have newest versions of Xcode, cmake, ffmpeg, faac, faad, qt, ...) so if anybody can help me, that would be much appreciated, thanks!
Run the following commands assuming you have brew installed.
brew tap homebrew/science
brew install opencv
Use macports. Once you install macports, just run
sudo port install opencv
at the command prompt.
This other stackoverflow question is mostly correct for how to start using the macports version of opencv in Xcode.
Here are some more up-to-date instructions for using the macports version of OpenCV from Xcode 5:
Create a new Xcode project as OS X Application -> Command Line Tool, etc.
Click the target in the upper left
Click the Build Settings tab
Scroll down to (or search for) the Search Paths section
Under User Header Search Paths add /opt/local/include
Click the Build Phases tab
Click Link Binary with Libraries
Choose the required libraries from /opt/local/lib
At least, add libopencv_core.dylib
If you want pre-set command-line arguments, go to Product -> Scheme -> Edit Scheme (⌘<)
Click the Run tab on the left
Click the Arguments tab
Enter arguments into Arguments Passed on Launch
Done!
You can try to install opencv from homebrew, I met the same problem with cmake in my 10.9 and finally I found the solution from Chris Muktar. Here are the steps:
Make sure xcode-select --install Xcode command line tools 5.0.1 are installed.
Install python using brew - brew install python.
pip update
pip install numpy
brew linkapps
Add export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH to .bash_profile in your home directory
brew install opencv
In the last step I came across the Error: No available formula for opencv. In this case, you should first run the command brew tap homebrew/science.
Good Luck
This may be related to the current issues with Qt on Mavericks.
See: https://github.com/mxcl/homebrew/pull/23793
I'd try installing the current patched homebrew keg for qt, and then installing opencv:
brew update
brew uninstall opencv
brew uninstall qt
brew install -v https://raw.github.com/cliffrowley/homebrew/patched_qt/Library/Formula/qt.rb --HEAD
brew install opencv
Caution to the wind: the qt build took me about an hour to complete
Thanks for the answers!
I ended up with the following solution: I added #define GTEST_USE_OWN_TR1_TUPLE 1 to ts_gtest.h. Probably not the prettiest solution but I don't need gtest for anything else so it works for me.
You could disable ts module in CMakeCache.txt file:
//Include opencv_ts module into the OpenCV build
BUILD_opencv_ts:BOOL=OFF
I mean that there is no reason to modify existing code.
I think you really need to do a configuration and that is it.
I tried your problems and I think steps are as follow:
open terminal in mac
in the terminal, check you have cmake and ccmake. If not, please type "brew install cmake"
go to your downloaded opencv folder, make a new folder by typing "mkdir build", then "cd build"
in this build folder, check you have gcc and g++ installed.
now, doing configuration by type "ccmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++", type "c" first for configuration then exit by "e" then "g" for generating!
you should be in terminal again now! then please type "make"
type "sudo make install", and now the opencv is installed, check it by type "brew list", and you should see the opencv there
type "brew linkapps"
do a test if you have python, by typing "import cv", and it should be working!
I'm using mac and I want to install osm2pgsql to import OSM data into PostgreSQL.
I execute brew install osm2pgsql in the terminal. (I have already executed brew update).
Here is the output:
==> Downloading https://github.com/openstreetmap/osm2pgsql/archive/v0.82.0.zip
Already downloaded: /Library/Caches/Homebrew/osm2pgsql-0.82.0.zip
==> ./autogen.sh
==> ./configure --with-proj=/usr/local/opt/proj
checking for fork... yes
checking for xml2-config... /usr/bin/xml2-config
checking for xml2 libraries... yes
checking for zlib compression library... no
configure: error: required library not found
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
And here is the output of executing brew doctor:
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/libMonoPosixHelper.dylib
/usr/local/lib/libSFFileMonitor.32.dylib
/usr/local/lib/libSFIPC.32.dylib
/usr/local/lib/libSFIPC.I.dylib
/usr/local/lib/libSFsqlite3.7.4.dylib
/usr/local/lib/libSFSyncEngine.I.dylib
I don't know these dylibs and should I delete them?
What should I do to linstall osm2pgsql?
Or should I give up osm2pgsql and use some other tool to import OSM data into PostgreSQL?
[EDIT 1]
According to http://www.zlib.net/, zlib is already included as part of Mac OS X.
And when I search it in google, I found this https://github.com/josegonzalez/homebrew-php/issues/205 and this https://github.com/josegonzalez/homebrew-php/issues/538
So I execute the following two commands:
brew tap homebrew/dupes
brew install zlib
And the result output is:
==> Downloading http://zlib.net/zlib-1.2.8.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/zlib/1.2.8
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/zlib/lib
CPPFLAGS: -I/usr/local/opt/zlib/include
==> Summary
It seems that I don't have to install zlib.
Again I execute brew install osm2pgsql, but it still doesn't work.
[Edit 2]
I give up homebrew and install osm2pgsql via a binary installer.
FYI:
http://wiki.openstreetmap.org/wiki/Osm2pgsql#Binary_Installer
https://github.com/openstreetmap/osm2pgsql/issues/15
I don't know anything about brew but according to the error message you are missing the zlib library. Try to install it first.
And you should keep to osm2pgsql because it is the standard tool to import OSM data into a PostgreSQL database.
You have to edit the formula by using the following command:
brew edit <formula_name>
Then, you have to make the exports needed in the brew env, the best place to do this is in the install function just before the call of
system "./configure", *args
Here are the lines to append
ENV.append 'LDFLAGS', "-L/usr/local/opt/zlib/lib"
ENV.append 'CPPFLAGS', "-I/usr/local/opt/zlib/include"
When it is finished, you just have to run the brew installation again and it will works
I edited the formula, as it was not running on Mac OS X Mavericks either. See the gist which made it install successfully.
https://gist.github.com/christoph-buente/e18584e312bcadfe82e5
And i filed a pull request to the homebrew repository. Hopefully it will be merged:
https://github.com/Homebrew/homebrew/pull/29862
rebuilding a mac from scratch. Installed xcode and rvm then trying to install rubies but they are all giving me:
Error running ' ./configure --prefix=/Users/durrantm/.rvm/rubies/ruby-1.9.3-p125
--enable-shared --disable-install-doc --with-libyaml
--with-opt-dir=/Users/durrantm/.rvm/usr ',
please read /Users/durrantm/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
Michaels-MacBook-Air:~ durrantm$
The log has:
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/durrantm/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
Do I need the gcc C compliler? How do I install it ?
The critical step is actually installing the Xcode command line tools after the download completes and Xcode is installed
After downloading and installing Xcode from the app store, you need to actually install the command line tools it provides.
To do this open Xcode, go to preferences then downloads. There is an "Install" link to add the command line tools.
Once this has been completed, make sure to re-open your terminal window.
Either you install Xcode from the App store or if you have a registered free developer account you can download the XCode command line tools from http://developer.apple.com/downloads
Once you have that installed you can go ahead and install your rubies with rvm.
rbenv install error :
configure: error: in `/tmp/ruby-build.20130911002344.31969/ruby-2.0.0-p0':
configure: error: no acceptable C compiler found in $PATH
...brought me here,
I am currently installing Ruby on rails, ruby through rbenv on a brand new Debian,
Original command is :
rbenv install 2.0.0-p0
As a solution :
sudo apt-get install build-essential
Cheers !
[Sorry for the Xcode ppl]
Read rvm requirements it shows what you need to compile ruby.