When trying to install pkg-config on a brand new install of 10.8.5 i got a ./configure: no such file or directory.
first I downloaded the source with git
git clone git://anongit.freedesktop.org/pkg-config
then I switched to the directory
cd /Users/nah/Desktop/pkg-config
when I run ls I can see the configure file but when I run
./configure --with-internal-glib
I get ./configure: no such file or directory. Even though I see the file in the pkg-config directory.
When I searched for answers online The two i saw were are you in the correct directory which i clearly am, and the second answer i saw was to use homebrew or Macports. I know homebrew and macports will work but that doesn't really answer the question it's sort of a work around. I than realized that the configure file wasn't executable so I ran chmod on it to make it executable but I get the same thing. The other thing I thought of was the configure file is configure.ac , a quick glance at a bunch of other source files on my computer and they all have configure files with no .ac.
I also tried dragging the executable configure file to terminal to run it and I got
line 1: syntax error near unexpected token [2.62}
/Users/nah/pkg-config/configure.ac: line 1: 'AC_PREREQ([2.62])'
do you think there's a problem with the configure script for Mountain lion, i did this on snow leopard about a month ago with no problems.
so in conclusion, i can't install pkg-config using normal ./configure; make; make install;
And would like to know way to solve problem with out homebrew or Macports work around.
Related
I am trying to run an application (concretely, the quabs QBF solver: https://github.com/ltentrup/quabs), following all of its paths.
git clone https://github.com/ltentrup/quabs.git
cd quabs
git submodule init
git submodule update
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
But receive the following error in the last part, the make:
xcrun: error: unable to load libxcrun (dlopen(/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib, 0x0005): tried: '/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
Which I have no idea how to interpret.
I found several errors that are similar, but are not the same. For instance, Unable to run git on Mac OS Big Sur seems similar, but (1) I have had the problem with MacOS Monterey and, above all, (2) my problem is not when running git, but when running make (however, I am doing make in a Gitlab repository).
Anyway, using that post (and this other one: https://developer.apple.com/forums/thread/652377), I remember performed the following:
sudo rm -r /Library/Developer/CommandLineTools
That is, I uninstall the Command Line tools. However, when doing make, it returns exactly the same error. Which is really strange.
So, I reinstall it, using:
xcode-select --install
And the received error is exactly the same one.
Long story short, whenever I do this xcode-select --install, I can after it do sudo rm -r /Library/Developer/CommandLineTools. However, when I check this path (before removing it), I realize there is no such path, i.e. cd /Library/Developer/ contains no CommandLineTools. It does contain an Xcode directory, though.
Thus, this sounds rare from the very beginning.
Can anyone help? My only solution is to try it in an Ubuntu system, but rather not to and understand what is going on..
Note that there is a response (in the second post) that I do not understand and may help:
The default arm64e architecture will run for any command that has it in the bundle, the problem is that the libraries don't have the desired architecture. If you look at git for example using file command see that there is an arm64e version, this is the one that is running by default, use the file command to look at the architectures...
PS: As for the machine, I am using a MacBook Air with the new M1 chip, just in case this information is key, since the M1 yields several problems.
PS2: In other posts (see, for instance, https://developer.apple.com/forums/thread/694283) the solution is, again, removing and reinstalling. What is wrong in my case, then?
I tried installing FFmpeg with homebrew today. When I enter "brew install FFmpeg" I get this:
I tried running commands like brew doctor and git -C $(--repo homebrew/core)
I'm using macOS Big Sur btw.
EDIT: I installed FFmpeg as a final solution it seems to be working now. Thanks for helping, guys. I don't know what's wrong with my homebrew though.
It's a weird error, but a workaround would be to execute following commands:
$~ wget https://www.nasm.us/pub/nasm/stable/nasm-2.15.05.zip -O nasm.zip
$~ unzip nasm.zip
$~ cd nasm*
$~/nasm ./configure --prefix /usr
$~/nasm make
$~/nasm sudo make install
The above
downloads the zipped source code
unzips it
goes into the unzipped folder
configures the source code to have the programs installed to the right place
builds programs and libraries from the source code
installs everything that has been built
After that, your homebrew should find nasm and just skip it.
EDIT:
Whilst the above should work perfectly fine on Linux, I learned that it does not work on Mac OS (thank you #Philippe !) as stated in the Mac OS docs on System Integrity Protection:
System Integrity Protection includes protection for these parts of the system:
/System
/usr
/bin
/sbin
/var
Apps that are pre-installed with OS X
Paths and apps that third-party apps and installers can continue to write to include:
/Applications
/Library
/usr/local
So, we can conclude that we cannot install nasm into /usr, but into /usr/local. That means command No. 4 should be changed to ./configure --prefix /usr/local.
EDIT2:
In case you get an error in step 1, use curl https://www.nasm.us/pub/nasm/stable/nasm-2.15.05.zip -o nasm.zip instead.
In case you get an error about your shell not finding /bin/sh, prepend the name of a shell you have installed on your PC to the command line.
Basic unix installation ignorance, I suppose. I'm trying to install/build Port Audio on macOS 10.11 in a terminal session. I downloaded Port Audio into a developer directory (using both the tarball and the git versions) and tried to follow the basic build instructions given on the website. I dragged the directory over to the terminal window to set it up. Then tried the "./configure && make". Using the command on the directory won't work. I can't find a file in there that I can use these commands on. What basic concept am I missing?
Thanks.
Okay, I figured out that I was changing the directory incorrectly using cd. Don't know why, but I had to change one directory at a time or bash would kick me back to the beginning directory. When I finally got to the portaudio directory, "./configure && make" worked just as advertised. Solved.
I have downloaded ragel source code and trying to compile it.
I am not able to configure it. getting following error on running
./configure --prefix=PREFIX
-bash: ./configure: No such file or directory
I have download all necessary command line compilation tools. not sure what is missing.
It's much easier to use MacPorts. So after installation:
$ sudo port install ragel
and it will take care of downloading dependencies, and will already know how to configure the project.
I am trying to compile an open source program on Mac OSX and getting stuck trying to get the build configured. I have autoconf version 2.63 installed but trying to do reconfigure I get this error "aclocal.m4:14: error: this file was generated for autoconf 2.61." and "you should regenerate the build system entirely".
I researched this as best I could and most seemed to imply automake should be able to regenerate itself using the autoreconf command. Autoreconf fails as well with the exact same message.
Things I've tried: remaking and reinstalling the autoconf package, remaking and reinstalling the m4 package, running the above commands as root instead of as a user.
Anyone have any ideas?
Thanks,
- Mike
Look for script like autogen.sh, they usually contain the right order of tools to run.
In this case the problem seems to be aclocal