Install Spatialite on OS X Yosemite - macos

I have problems installing Spatialite tools on OS X Yosemite, first of all I have read Install Spatialite for python (GeoDjango) on OS X but it didn't help me to resolve the issue.
Here I will provide steps that I did in order to install spatialite with Homebrew.
1) Install latest sqlite3
brew install sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.8.8.3.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/sqlite-3.8.8.3.yosemite.bottle.tar.gz
==> Pouring sqlite-3.8.8.3.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means 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.
OS X provides an older sqlite3.
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/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include
==> Summary
๐Ÿบ /usr/local/Cellar/sqlite/3.8.8.3: 9 files, 2.1M
2) Install libspatialite
brew install libspatialite
==> Downloading https://homebrew.bintray.com/bottles/libspatialite-4.2.0_1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/libspatialite-4.2.0_1.yosemite.bottle.tar.gz
==> Pouring libspatialite-4.2.0_1.yosemite.bottle.tar.gz
๐Ÿบ /usr/local/Cellar/libspatialite/4.2.0_1: 26 files, 17M
3) Install spatialite-tools
brew install spatialite-tools
==> Downloading https://homebrew.bintray.com/bottles/spatialite-tools-4.2.0.yosemite.bottle.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/spatialite-tools-4.2.0.yosemite.bottle.3.tar.gz
==> Pouring spatialite-tools-4.2.0.yosemite.bottle.3.tar.gz
๐Ÿบ /usr/local/Cellar/spatialite-tools/4.2.0: 21 files, 804K
4) Looks good so far, lets try to use spatialite
spatialite -version
SQLite header and source version mismatch
2015-02-25 13:29:11 9d6c1880fb75660bbabd693175579529785f8a6b
2014-12-09 01:34:36 f66f7a17b78ba617acde90fc810107f34f1a1f2e
So it looks like spatialite is built on top of sqlite3
(f66f7a17b78ba617acde90fc810107f34f1a1f2e)
but not (9d6c1880fb75660bbabd693175579529785f8a6b)
Current version 3.8.8.3 9d6c1880fb75660bbabd693175579529785f8a6b
Required version 3.8.7.4 f66f7a17b78ba617acde90fc810107f34f1a1f2e
To fix this I need to install manually sqlite 3.8.7.4 instead of 3.8.8.3 which is latest version in homebrew
6) Remove currently installed sqlite
brew remove sqlite
brew unlink sqlite
7) Install sqlite 3.8.7.4
Download tarbal from here https://www.sqlite.org/src/info/f66f7a17b78ba617acde90fc810107f34f1a1f2e and unpack contents
Install with
./configure
sudo make clean
sudo make
sudo make install
8) Try to create spatialite database
spatialite geo.db "SELECT InitSpatialMetaData();"
dyld: lazy symbol binding failed: Symbol not found: _sqlite3_rtree_geometry_callback
Referenced from: /usr/local/lib/libspatialite.7.dylib
Expected in: /usr/local/lib/libsqlite3.0.dylib
dyld: Symbol not found: _sqlite3_rtree_geometry_callback
Referenced from: /usr/local/lib/libspatialite.7.dylib
Expected in: /usr/local/lib/libsqlite3.0.dylib
Trace/BPT trap: 5
So the issue is that it cannot find _sqlite3_rtree_geometry_callback in a library...
Please point me what I did wrong or if there is a better way to install it on OS X
Thank you for your time

Related

Homebrew not updating the version of my package

I am a homebrew novice and have a tap with a single package, mark-on-mac (https://github.com/sjbonner/homebrew-tap). The tap is simply a wrapper for the executable of Program MARK for the analysis of mark-recapture data that defines the location for the gcc libraries.
I have updated the formula several times (now on v0.0.7), but the command
brew install mark-on-mac
always finds and installs version v0.0.3. In order to install the up-to-date version I have to specify my tap
brew install sjbonner/tap/mark-on-mac
Here's a listing showing the behaviour when I don't and then do specify the tap
Simons-MBP:homebrew-tap sbonner$ brew info mark-on-mac
mark-on-mac: stable 0.0.3
Command-line version of Dr. Gary White's mark-recapture software
http://warnercnr.colostate.edu/~gwhite/mark/mark.htm
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mark-on-mac.rb
Simons-MBP:homebrew-tap sbonner$ brew install mark-on-mac
==> Downloading https://github.com/sjbonner/mark-on-mac/archive/v0.0.3.tar.gz
==> Downloading from https://codeload.github.com/sjbonner/mark-on-mac/tar.gz/v
0.8# 2.1######## 12.1############### 22.2###################### 31.3########################### 38.5################################## 48.4########################################## 59.2################################################# 69.1######################################################## 79.0################################################################ 89.7######################################################################## 100.0%
๐Ÿบ /usr/local/Cellar/mark-on-mac/0.0.3: 5 files, 4.0MB, built in 6 seconds
Simons-MBP:homebrew-tap sbonner$ brew uninstall mark-on-mac
Uninstalling /usr/local/Cellar/mark-on-mac/0.0.3... (5 files, 4.0MB)
Simons-MBP:homebrew-tap sbonner$ brew info sjbonner/tap/mark-on-mac
sjbonner/tap/mark-on-mac: stable 0.0.7
Command-line version of Dr. Gary White's mark-recapture software
http://warnercnr.colostate.edu/~gwhite/mark/mark.htm
Not installed
From: https://github.com/sjbonner/homebrew-tap/blob/master/mark-on-mac.rb
Simons-MBP:homebrew-tap sbonner$ brew install sjbonner/tap/mark-on-mac
==> Installing mark-on-mac from sjbonner/tap
==> Downloading https://github.com/sjbonner/mark-on-mac/archive/v0.0.7.tar.gz
Already downloaded: /Users/sbonner/Library/Caches/Homebrew/downloads/a0310eb4eafbf40481bd5f010d2e369da2f91c41a203b508c340bfad893fd501--mark-on-mac-0.0.7.tar.gz
๐Ÿบ /usr/local/Cellar/mark-on-mac/0.0.7: 5 files, 4MB, built in 3 seconds
Removing: /Users/sbonner/Library/Caches/Homebrew/mark-on-mac--0.0.3.tar.gz... (1.7MB)
Simons-MBP:homebrew-tap sbonner$
Can anyone tell me why this is happening? Why does v0.0.3 get installed by default? How can I stop this?
Thanks in advance!
Simon
It seems the local repository sjbonner/tap is outdated. You need to sync your local repo with the remote one.
# cd into the local repo
cd "$(brew --repo sjbonner/tap)"
# find out the latest commit locally
git log -s -1
# compare the commit with your remote repo
# if the repo is outdated, run
brew update

I cannot get solidity installed with homebrew on macOS Sierra. Installation hangs at boost

I have tried to install solidity on my Mac with
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity
as suggested at solidity#binary-packages. But when I try to brew install solidity the installation process gets stuck right here when installing boost:
bash-3.2$ brew install solidity
==> Installing solidity from ethereum/ethereum
==> Installing dependencies for ethereum/ethereum/solidity: boost, cryptopp, gmp
==> Installing ethereum/ethereum/solidity dependency: boost
==> Using the sandbox
==> Downloading https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.bz2
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost-1.64.0.tar.bz2
==> Downloading https://github.com/boostorg/mpi/commit/f5bdcc1.patch
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-c7af75a83fef90fdb9858bc988d64ca569ae8d940396b9bc60a57d63fca2587b.patch
==> Downloading https://github.com/boostorg/serialization/commit/1d86261.diff
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-155f603a00975a1702808be072c1420964feac8323de39c111a9d3a363a4ed9a.diff
==> Patching
==> Applying f5bdcc1.patch
patching file boost/mpi/detail/mpi_datatype_primitive.hpp
patching file boost/mpi/detail/packed_iprimitive.hpp
patching file boost/mpi/detail/packed_oprimitive.hpp
Hunk #2 succeeded at 97 (offset -5 lines).
==> Applying 1d86261.diff
patching file boost/serialization/array.hpp
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib --without-icu --without-libraries=python,mp
==> ./b2 headers
==> ./b2 --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib -d2 -j4 --layout=tagged --user-config=user-config.jam
I did find this brew hanging thread and tried to fix everything brew doctor gave me and I have the latest command line tools installed. I could not get it to work yet. Any ideas?
JK! Wow. I guess one of the manny things I tried must have worked. Now it still takes a very very long time but eventually it came to:
๐Ÿบ /usr/local/Cellar/boost/1.64.0_1: 12,630 files, 404.4MB, built in 17 minutes 38 seconds
17minutes. Wow.

Libtiff dependancy fails when installing wine with homebrew OSX 10.12.3

I am trying to install wine through homebrew. When its installing the dependancies, the libtiff fails because the source package url is not found and whole installer quits. I installed libtiff seperately and then tried, still this problem occurs. Any workaround ?
Rangarajans-MBP:homebrew-core ranga$ brew install wine
==> Installing dependencies for wine: libtiff, gd, libgphoto2, little-cms2, cmake, jasper, libicns, makedepend, openssl, net-snmp, sane-backends, libtasn1, gmp, nettle, libunistring, libffi, p11-kit, gnutls
==> Installing wine dependency: libtiff
==> Using the sandbox
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.7.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libtiff--patch"
Download failed: https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
Rangarajans-MBP:homebrew-core ranga$
ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tโ€Œโ€‹ar.xz has been superseded by ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.tโ€Œโ€‹ar.xz. If you compare the files, there's an extra CVE patch added.
To get homebrew to install wine, patch the libtiff formula to use the updated Debian package:
Open /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libtiff.rb
Patch the following lines so it looks like this: https://gist.github.com/georghendrik/c649b62c017c89980ec6fcad31513510
url "https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.tar.xz"
sha256 "f4183c48ed74b6c3c3a74ff1f10f0cf972d3dba0f840cf28b5a3f3846ceb2be6"
"patches/16-CVE-2016-10094.patch", (note the comma)
"patches/17-CVE-2017-5225.patch"
Run brew install wine. Homebrew will update itself and stash your work.
Run cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/; git stash pop
Run brew install wine again.

Error: inreplace failed while installling with homebrew?

I would like to install treetagger in OS X. In order to make it easier I tried to search if this is possible with Homebrew. So I look at the web and found this formula from pepijnkokke user. Next, I tried to install treetagger as follows:
user#MacBook-Pro-User-2:~$ brew install /Users/user/Downloads/tree-tagger.rb
However, I got the following error:
==> Installing dependencies for tree-tagger: openssl, wget
==> Installing tree-tagger dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2g.el_capitan.
######################################################################## 100.0%
==> Pouring openssl-1.0.2g.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
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/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary
๐Ÿบ /usr/local/Cellar/openssl/1.0.2g: 1,678 files, 12.0M
==> Installing tree-tagger dependency: wget
==> Downloading https://homebrew.bintray.com/bottles/wget-1.17.1.el_capitan.bot
######################################################################## 100.0%
==> Pouring wget-1.17.1.el_capitan.bottle.1.tar.gz
๐Ÿบ /usr/local/Cellar/wget/1.17.1: 9 files, 1.5M
==> Installing tree-tagger
==> Downloading http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tr
######################################################################## 100.0%
Warning: SHA1 support is deprecated and will be removed in a future version.
Please switch this formula to SHA256.
Error: SHA1 mismatch
Expected: d823320b718eb41a5b4fef449a711307caaf0d88
Actual: 340e09912101acd996642eeed8f623315fa6d672
Archive: /Library/Caches/Homebrew/tree-tagger-3.2.tar.gz
To retry an incomplete download, remove the file above.
I removed the above file and the sha line (sha1 "d823320b718eb41a5b4fef449a711307caaf0d88") and tried again. Nevertheless I got this:
user#MacBook-Pro-de-User-2:~$ brew install /Users/user/Downloads/tree-tagger.rb==> Downloading http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tr
######################################################################## 100.0%
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tagger-sc
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-p
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-c
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/install-t
==> chmod +x ./install-tagger.sh
==> ./install-tagger.sh
Error: inreplace failed
cmd/chunker-read-lemma.perl:
expected replacement of /BIN=.*/ with "BIN=/usr/local/Cellar/tree-tagger/3.2/libexec/bin"
expected replacement of /CMD=.*/ with "CMD=/usr/local/Cellar/tree-tagger/3.2/libexec/cmd"
expected replacement of /LIB=.*/ with "LIB=/usr/local/Cellar/tree-tagger/3.2/libexec/lib"
Any idea of how to install treetagger with homebrew?.
Have you tried installing openssl via homebrew?
brew install openssl
brew link openssl --force
brew install treehugger
Why don't you just install it the normal way as mentioned in the document?
The following steps are necessary to install the TreeTagger (see below for the Windows version). Download the files by right-clicking on the link. Then select "save file as". All files should be stored in the same directory.
Download the tagger package for your system (PC-Linux, Mac OS-X
(Intel-CPU), PC-Linux (version for older kernels)).
Download the tagging scripts into the same directory.
Download the installation script install-tagger.sh.
Download the parameter files for the languages you want to process.
Open a terminal window and run the installation script in the
directory where you have downloaded the files:
sh install-tagger.sh
Make a test, e.g. echo 'Hello world!' | cmd/tree-tagger-english
You might want to add ~/homebrew-compling/cmd and ~/homebrew-compling/bin to the PATH variable so that you do not need to specify the full path to run the tagging scripts.
This worked for me fine!

Could not find Doxygen (missing: DOXYGEN_EXECUTABLE) in Mac OS X

I want to install meta on my Mac OS X. I have OS X 10.9.3, and I received the following errors:
DICU_ROOT=/usr/local/opt/icu4c
-- Compiler supports C++1y (using it)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Locating libc++...
-- Located libc++, using it.
-- Locating libc++'s abi...
-- Found libc++abi, using it.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sara/meta/build
MacBook-Air:build sara$ brew install DOXYGEN_EXECUTABLE
Error: No available formula for doxygen_executable
Searching formulae...
Searching taps...
saras-MacBook-Air:build sara$ meta
-bash: meta: command not found
saras-MacBook-Air:build sara$ build
-bash: build: command not found
Doxygen isn't installed by default. You can download it using brew.
$ brew info doxygen
doxygen: stable 1.8.9.1 (bottled), HEAD
http://www.doxygen.org/
/usr/local/Cellar/doxygen/1.8.9.1 (5 files, 15M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/doxygen.rb
==> Dependencies
Optional: graphviz โœ˜
==> Options
--with-doxywizard
Build GUI frontend with qt support.
--with-graphviz
Build with dot command support from Graphviz.
--with-libclang
Build with libclang support.
--HEAD
Install HEAD version
$brew install doxygen
brew install --head doxygen worked for me
mahesh#Maheshs-MacBook-Air-M1 glfw-3.3.7 % brew install --head doxygen
Warning: Treating doxygen as a formula. For the cask, use homebrew/cask/doxygen
==> Downloading https://ghcr.io/v2/homebrew/core/bison/manifests/3.8.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/bison/blobs/sha256:78ce4e93936c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Cloning https://github.com/doxygen/doxygen.git
Cloning into '/Users/mahesh/Library/Caches/Homebrew/doxygen--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
Warning: Your Xcode (13.2.1) is outdated.
Please update to Xcode 13.3 (or delete it).
Xcode can be updated from the App Store.
==> Installing dependencies for doxygen: bison
==> Installing doxygen dependency: bison
==> Pouring bison--3.8.2.arm64_monterey.bottle.tar.gz
๐Ÿบ /opt/homebrew/Cellar/bison/3.8.2: 99 files, 3.7MB
==> Installing doxygen --HEAD
==> cmake ..
==> make
==> make install
๐Ÿบ /opt/homebrew/Cellar/doxygen/HEAD-5ef4fee: 5 files, 18.9MB, built in 1 minute 1 second
==> Running `brew cleanup doxygen`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
source https://github.com/Homebrew/homebrew-core/issues/41441

Resources