I'm using Mac OS X 10.7
At first, I used jhbuild to install some libs.It install libs in "/Users/dinosaur/gtk/inst/lib/" I think it not good.
so I remove directory.
Home Brew is very good.so I want to install gegl with brew. So I input "brew install gegl" in terminal.But get a error:
grep: /Users/dinosaur/gtk/inst/lib/libiconv.la: No such file or directory
sed: /Users/dinosaur/gtk/inst/lib/libiconv.la: No such file or directory
libtool: link: `/Users/dinosaur/gtk/inst/lib/libiconv.la' is not a valid libtool archive
make[2]: *** [text.la] Error 1
make[2]: *** Waiting for unfinished jobs....
It seems brew look for libs at jhbuild build path. But I'v removed it.
How can I clean the jhbuild setting, Or another way to build gegl with brew.
sudo brew install libiconv
sudo brew link libiconv
That should do the trick.
Related
I'm trying to install fastecdsa on macOS BigSur (M1 chip) by running
(venv) $ pip3 install fastecdsa
and even though I previously installed gmp:
$ brew install gmp
it cant find the lib, no matter what I do
src/curve.h:4:10: fatal error: 'gmp.h' file not found
#include "gmp.h"
Although the error changed when I created a symlink
ln -s /opt/homebrew/include/gmp.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
and now I get:
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/gcc' failed with exit code 1
I also tried:
passing the path via env CFLAGS, LDFLAGS and both via global env export (export CFLAGS=...)
LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib pip3 install fastecdsa
CFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include pip3 install fastecdsa
xcode-select --install
endlessly brew uninstall gmp and brew install gmp, even brew reinstall gmp and brew unlink gmp
installing rosetta2
turning it off and on again
I can't put my finger on it :(
You may have resolved this by now, but just to say that I ran into something similar, and the solution for me was to tell ld to look in the homebrew library path. Run this/add it to ~/.profile:
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
export INCLUDE_PATH=$INCLUDE_PATH:/opt/homebrew/include
(I didn't need INCLUDE_PATH in my case, but it looks like you might!)
After that, perhaps your python commands will start working!
enter image description here
use the setup.py to install and modify the setup.py as the image
I'm setting up flutter on my machine. However when I try to install cocoapods by using
sudo gem install cocoapods
I get this error:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210324-1667-1wwdce5.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... yes
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
creating extconf.h
creating Makefile
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
make "DESTDIR="
make: *** No rule to make target `"/Volumes/macOS', needed by `AbstractMemory.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.0/gem_make.out
Is this caused by the fact that partition name contains 'space' in its name? My drive name on which OS is install is 'macOS Big Sur' while flutter resides on another partition which is 'macOS Storage'
Can someone please help?
This would be resolved by:
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
If you needed to install CocoaPods 1.10.0 + you can use HomeBrew and use the command below in your command line:
brew install cocoapods
I have confronted the same error under BigSur,
and I figured out a strange thing when I tried to install cocoa in traditional way. The https://cocoapods.org address gave "Internal Server Error". And that means something wrong at cocoa servers. So I planned to install the new version of cocoa using home-brew.
I used the above code to install home-brew to Mac.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, I uninstalled current old version cocoapods, using the command below
sudo gem uninstall cocoapods
Then, I installed new version of cocoa pods using home-brew,
brew install cocoapods
Then, I used the command below to fix the inconsistencies.
brew link --overwrite cocoapods
And victory :)
I'm trying to compile The Tilde Text Editor under MacOS 10.12.2 (Sierra) with no previous experience in compiling (so please correct me on anything) and I'm getting this error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [src/libt3window.la] Error 1
Steps so far (some are redundant):
Install homebrew, Xcode
brew install cmake
brew install gettext
brew link --force gettext
brew install autoconf (?)
brew install automake (?)
brew install libtool
brew install pkg-config
brew install libunistring
brew install libsigc++
build libtranscript from source by changing this from configure:
[ -z "${LIBTOOL}" ] && LIBTOOL="libtool"
to this:
[ -z "${LIBTOOL}" ] && LIBTOOL="glibtool"
and this in Makefile.in
LIBTOOL=libtool
to this:
LIBTOOL=glibtool
then ./configure && make && sudo make install
build libt3window from source by changing configure and Makefile.in like with libtranscript, then ./configure && make. So with make the error shows up:
duplicate symbol __t3_modifier_hack in:
src/.libs/window.o
src/.libs/terminal_init.o
ld: 5 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [src/libt3window.la] Error 1
And one more question: how to I remove everything I installed?
This is caused by a bug in libt3window (a missing "extern" in the declaration of the _t3_modifier_hack variable). This is fixed in version 0.2.6 of libt3window.
I'm quite new to rbenv let alone ruby and having some difficulty diagnosing the following installation failure:
rbenv install 2.0.0-p0
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/5fe00cda18ca5daeb43762b80c38e06e
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /Users/Haani/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/50d307c4dc9297ae59952527be4e755d
Installing ruby-2.0.0-p0...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/50/wzjqg8d11sn7xnkrsmgr1gn80000gn/T/ruby-build.20140420110650.75863
Results logged to /var/folders/50/wzjqg8d11sn7xnkrsmgr1gn80000gn/T/ruby-build.20140420110650.75863.log
Last 10 log lines:
compiling ossl_x509cert.c
compiling ossl_x509crl.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
make: *** [build-ext] Error 2
See full log here
There seems to be a problem with the Homebrew package "readline".
brew uninstall readline
brew install https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb
brew pin readline
Then retry installing ruby with
rbenv install 2.0.0-p0
Answer found thanks to https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071
I needed to update my command line tools.
sudo rm -rf /Library/Developer/CommandLineTools
Then
sudo xcode-select --install
Tried to install a gem on Mountain Lion and make couldn't find gcc-4.2:
kamil$ gem install posix-spawn -v '0.3.6'
Building native extensions. This could take a while...
ERROR: Error installing posix-spawn:
ERROR: Failed to build gem native extension.
/Users/kamil/.rbenv/versions/1.9.3-p0/bin/ruby extconf.rb
creating Makefile
make
compiling posix-spawn.c
make: gcc-4.2: No such file or directory
make: *** [posix-spawn.o] Error 1
If you have Xcode installed, gcc should be available. Check where it is with:
kamil$ which gcc
/usr/bin/gcc
Then make a user-land symbolic link from gcc-4.2 to plain gcc:
kamil$ sudo ln -s ~/bin/gcc /usr/bin/gcc-4.2
(Ensure the user-land bind folder is in your path via export PATH=...:$HOME/bin in your .bash_profile or .zshrc.)
Gem installed fine afterwards.
Install simply apple-gcc42 with brew. It generate gcc-4.2 .
brew install apple-gcc42
So we do not need symlinks, which apple update may remove.
Homebrew
As #Artur Bodera mentioned modern OSX will refuse to let you create the symlink in the systems /bin folder.
To avoid this simply create the symlink to your users bin folder
ln -s ~/bin/gcc /usr/bin/gcc-4.2
Don't forget to add the bin folder to your .zshrc or .bash_profile - e.g.
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$HOME/bin
I had a similar issue while installing a python pip package (building a wheel failed). I got the similar message:
unable to execute '/usr/bin/gcc-4.2': No such file or directory
error: command '/usr/bin/gcc-4.2' failed with exit status 1
Linking /usr/bin/gcc-4.2 to /usr/bin/gcc was not possible due to Apples System Integrity Protection (SIP), and linking it to /usr/local/bin/gcc-4.2 was not picked up by the wheel building process; it was still trying to use /usr/bin/gcc-4.2.
I was finally able to solve this by setting the CC variable in the terminal:
CC=/usr/bin/gcc
# Install your packages
pip install -r requirements.txt
PS : note that disabling SIP doesn't work, even with SIP disabled I wasn't able to create the /usr/bin/gcc-4.2 link.