Error: inreplace failed while installling with homebrew? - ruby

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!

Related

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.

Tried installing MongoDB with brew and it says "Error: Permission denied - (mongod.conf, /usr/local/etc/mongod.conf)"

Using Mac OSX 10.10.4 on 13' Macbook Air
Typed in 'brew update' like the Mongo docs said and it updated
Then typed 'brew install mongodb' and it took ages to say
Error: Permission denied - (mongod.conf, /usr/local/etc/mongod.conf)
This is what the console said leading up to that point, in case this helps:
Joshuas-Air:~ Josh$ brew install mongodb
==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.0.4.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mongodb-3.0.4.yosemite.bottle.tar.gz
Error: Permission denied - /usr/local/etc/mongod.conf
Warning: Bottle installation failed: building from source.
==> Installing mongodb dependency: scons
==> Downloading https://homebrew.bintray.com/bottles/scons-2.3.5.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring scons-2.3.5.yosemite.bottle.tar.gz
๐Ÿบ /usr/local/Cellar/scons/2.3.5: 208 files, 2.4M
==> Downloading https://fastdl.mongodb.org/src/mongodb-src-r3.0.4.tar.gz
######################################################################## 100.0%
==> Cloning https://github.com/mongodb/mongo-tools.git
Updating /Library/Caches/Homebrew/mongodb--github.com-mongodb-mongo-tools--git
==> Checking out tag r3.0.4
==> ./build.sh
==> /usr/local/opt/scons/bin/scons install --prefix=/usr/local/Cellar/mongodb/3.0.4 -j4 --osx-version-min=10.10 --cc=/usr/bin/clang --cxx=/usr/bin/clang++ --use-new-tools
Error: Permission denied - (mongod.conf, /usr/local/etc/mongod.conf)
Joshuas-Air:~ Josh$
Any help at all would be appreciated.
I had mostly the same error. I could not solve the problem by chown'ing the /usr/local directories as the prompts suggest possibly due to my upgrade to High Sierra. I was able to succeed installing mongodb by reinstalling homebrew using the following command:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This allowed my subsequent brew install mongodb to work.
I had the same problem, changing the directory permissions didn't work for me so eventually I've found this solution:
Download the most recent version (.tgz).
Open the terminal and head to the ~/Downloads folder or wherever you saved the file.
Untar: tar xvf filename.tgz.
Enter the directory and go to the bin directory.
At the terminal use the sudo bash (become root) command.
Now enter the command cp * /usr/local/bin.
Create /data/db directories (optional, this is the default location MongoDB uses).
At the terminal use the command exit to exit root user.
which mongo should now respond with /usr/local/bin and you are all set to go.
My guess is that the permissions on the folder /usr/local/ are not set 755 or 777.
You can change the permissions or simply try to run the command as root:
sudo brew install mongodb

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

Permissions Error installing ruby via homebrew via chef via vagrant on osx

I am trying to install ruby using homebrew, using chef, run by a vagrant script in a VMWare fusion VM running mac os x 10.8.5.
During the ruby install, I get the following error:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of brew install ruby ----
STDOUT: ==> Installing dependencies for ruby: pkg-config, readline, libyaml, openssl
==> Installing ruby dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config- 0.28.mountain_lion.bottle.tar.gz
==> Pouring pkg-config-0.28.mountain_lion.bottle.tar.gz
๐Ÿบ /usr/local/Cellar/pkg-config/0.28: 10 files, 636K
==> Installing ruby dependency: readline
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6.2.4.mountain_lion.bottle.tar.gz
==> Pouring readline-6.2.4.mountain_lion.bottle.tar.gz
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.
OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
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/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
==> Summary
๐Ÿบ /usr/local/Cellar/readline/6.2.4: 31 files, 1.6M
==> Installing ruby dependency: libyaml
==> Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
STDERR: Error: Permission denied - /var/root/Library/Logs
---- End output of brew install ruby ----
Ran brew install ruby returned 1
I also got this error when I tried to install rbenv using homebrew, which failed installing autoconf. I am not sure why it's trying to access /var/root/. When I run "brew install autoconf" from the VM, it installs fine.
I also tried adding:
node.default['homebrew']['owner'] = 'vagrant'
to my recipe just to make sure that the homebrew install was using the local user, but it made no difference.
My recipe looks like this:
# required for homebrew
bash "take-usr-local-ownership" do
user "vagrant"
cwd "/"
code <<-EOH
sudo mkdir -p /usr/local
sudo chown -R `whoami`:staff /usr/local
EOH
end
include_recipe 'homebrew'
# Install each of the packages using the `package` resource
%w(ruby).each do |package|
package package
end
Any ideas?
The syntax from the chef doc looks like this:
package "ruby" do
action :install
end
So that may be part of the issue.
The other thing is, who is homebrew installed by? Root? Vagrant? I assume you have to set that somewhere, not just who uses brew install.

Resources