Can't Install FFMPEG with homebrew - macos

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.

Related

Yosemite and Valgrind

Can you tell me how to install valgrind on yosemite? When I try to install it i get " checking for the kernel version... unsupported (14.0.0)
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x and 13.x (Mac OS X 10.6/7/8/9) "
There is no official path or update, and I didn't found anything (except http://comments.gmane.org/gmane.comp.kde.devel.bugs/1553705 , but they didn't resolve that problem).
As there's no stable release that supports Yosemite, you can install the latest development version with
brew install --HEAD valgrind
Whilst it may have been the case in past OS X release cycles that Valgrind took a period of time before achieving reasonable feature support, basic OS X 10.10 support is already available in Valgrind trunk due to significant work on pre-release Yosemite.
From the mailing list:
There has been some effort recently to improve Valgrind's support for
Yosemite. If you develop on Mac OS, you might like to try out the
trunk (svn co svn://svn.valgrind.org/valgrind/trunk) and report any
breakage you get. Support for Yosemite is good enough that at least
one large graphical application (Firefox) runs OK. Support for the
previous release, 10.9 (Mavericks), is also substantially improved.
Note that the work has targetted 64 bit processes only. 32 bit might
work, and probably better on Mavericks, but I suspect it will be
increasingly problematic on Yosemite due to Valgrind's 32 bit x86
instruction set support not having progressed passed SSSE3.
Julian Seward
http://sourceforge.net/p/valgrind/mailman/message/33047840/
Full disclosure: I'm one of the new Valgrind developers who contributed patches to support OS X 10.10
Valerio's svn workflow will download every branch which is time and resource consuming. A better procedure is to download just the trunk:
svn co svn://svn.valgrind.org/valgrind/trunk valgrind
cd valgrind
./autogen.sh
./configure
make
make install
Here is my take on it. I more or less had a clean mac with xcode installed.
Got it compiling and running with the following:
# build/install autoconf/automake/libtool so that 'autogen' works
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
tar -xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure && make && sudo make install
cd ..
curl -OL http://ftpmirror.gnu.org/automake/automake-1.14.tar.gz
tar -xzf automake-1.14.tar.gz
cd automake-1.14
./configure && make && sudo make install
cd..
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
cd ..
svn co svn://svn.valgrind.org/valgrind/trunk valgrind
cd valgrind
./autogen.sh
# important: configure-params, otherwise make ends in errors
./configure -disable-tls --enable-only64bit --build=amd64-darwin
make
# sudo, otherwise it fails due to permissions
sudo make install
Note that callgrind_control (from valgrind-3.11.0 SVN) doesn't appear to work on OS X, looks like a perl-script and the commandline tool which it runs (vgdb -l) prints something 'unexpected' which that script doesn't correctly parse ( so it won't be able to find the other process running with valgrind ).
Alternatively, the perl script just calls vgdb, we can also directly do that ( just figure out your process-id manually):
vgdb --pid=2858 instrumentation on
Worked for me on 10.10.1 :
svn co svn://svn.valgrind.org/valgrind
cd valgrind
./autogen.sh
./configure
make
make install
All of the solutions listed here failed for me. What finally ended up working was to use mac ports.
sudo port install valgrind-devel
Here's how to install it using alternative sources besides the official svn (because it seems to be intermittently available).
https://crispyappstudiosblog.wordpress.com/2015/07/07/installing-valgrind-on-osx-yosemite/
1) Navigate to this git mirror of the svn and download the latest
available version: http://repo.or.cz/w/valgrind.git
2) You need VEX as well, so grab the latest version here:
http://repo.or.cz/w/vex.git
3) Extract both of them. Put the entire contents of the VEX folder
into a folder called VEX in the top level of the valgrind directory.
cd to the valgrind directory, and execute the following:
Run ./autogen.sh
Run ./configure
Run make
Run sudo make install
Test it out by running valgrind --version You should be running at
least 3.11.0 SVN for it work on Yosemite.
I installed it on my mac by installing homebrew and then running this 3 commands in the terminal.
brew update
brew doctor
brew install --HEAD valgrind
PS: I have Os X El Capitan (10.11) but this should work with previous versions too.
I finally got Valgrind to work on my OSX El Capitan 10.11.12.
User Kalmiya's answer worked for me first after I installed Xcode commandline tools.
Type this in the terminal:
xcode-select --install
Now follow Kalmiya's post, step by step.
https://stackoverflow.com/a/30366798/3633475
Here is another take on the svn install. The previous ones did not work for me, since I needed to have automake and autoconf installed, which I did not, even though I had the latest version of the Xcode command line tools installed.
I got the following from this site. I also had to link automake and autoconf after doing brew install automake and brew install autoconf by doing brew link automake and brew link autoconf for this to work.
# Check out their repo...
$ svn co svn://svn.valgrind.org/valgrind/trunk valgrind-trunk
# and hop into it.
$ cd valgrind-trunk
# You need to have autoconf and automake installed to build Valgrind
# This example uses Homebrew to install these dependencies
# (MacPorts should also work)
# (Permission error? add sudo!)
$ brew install automake
$ brew install autoconf
# run autogen.sh in valgrind-trunk
$ ./autogen.sh
# Tricky, there are some hard wired paths in the Valgrind sources.
# You need to symlink the mach folder in your XCode SDK to /usr/include/mach
# Be sure to use the proper Xcode SDK "MacOSX10.10.sdk" in the path!
$ ln -sv /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/mach /usr/include/mach
# Run configure + set install paths in valgrind-trunk
$ ./configure --prefix=/usr/local
# Run Make and make install (permission error? add sudo!) in valgrind-trunk
$ make
$ make install
# Check it works
$ valgrind --version
valgrind-3.11.0.SVN
I have used kalmiya's instructions to build valgrind as a conda package for OSX Yosemite. For those who work with anaconda/conda, just do
conda install -c https://conda.binstar.org/groakat valgrind
Side-note:
I needed to install the command line tools as described below to get valgrind compiled.
https://stackoverflow.com/a/30471647/2156909
I got valgrind on Yosemite compiled, but had to use a hack to do so. While I think you should be using xcode-select install to get all command line tools (after which valgrind should make properly), but if you don't want to do this (eg. size of Xcode tools too big), you can also get the Darwin OSX code and copy the following files to /usr/include/mach
mach_vm.defs
task.defs
thread_act.defs
vm_map.defs
This allowed a clean compile and install, although note it is a rather slack hack.

how to install libX11 on OSx 10.9?

I am trying to install ROOT (cern.root.ch). When I run ./configure , I get a message that libX11 is missing and must be installed.
I did some research and found that I need to install
) XQuartz (I already have the latest version.)
) Command line tools in Xcode.
I tried installing Command Line Tools from apple's developer website. The installation goes through smoothly but how do I know whether it has been installed? I still get libX11 missing error with root's configure command.
I also tried xcode-select --install and it once went through smoothly and then later again gives error saying this package is no longer maintained - or something of that sort.
I understand I may have multiple installations... But I am still facing the problem of not having libX11 and not being able to install ROOT.
Thanks,
Hershal.
This link and the one referenced in it suggests you use homebrew (brew) to install it
$ ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
$ brew doctor
Remember to add the Homebrew directory to your PATH by adding the directory (found with brew --prefix) to your .bashrc, .zshrc or whatever shell file you’re using (.bashrc is the OS X default). We’ll also add the XQuartz binaries to the PATH in case anything needs them in the future.
export PATH=/usr/local/bin:/opt/X11/bin:$PATH
Start a new Terminal session to pick up the changes.
Now that Homebrew is installed, we can use it to install the required dependencies. Each may take some time as Homebrew generally compiles from source.
$ brew install gfortran # Fortran compiler
$ brew install python # Python interpreter
$ brew install pcre # Regular Expressions library
$ brew install fftw # Fast Fourier Transforms
$ brew install cmake # Cross-platform make
install root
$ brew tap homebrew/science
$ brew install --with-cocoa root
You don't say whether you have installed XCode as well as the commandline tools but I think you will need it

Install libSVM on Mac OSX and use easy.py and grid.py

I spent quite some time figuring out how to install libSVM on Mac OSX and use easy.py and grid.py. I've done quite some research but there are problems such as gnuplot isn't installed in the place where easy.py is calling it with brew.
It turned out I have to do the following steps
go to https://www.dropbox.com/s/rpn6yersv06tttz/gnuplot-4.2.5-i386.dmg
download the gnuplot-4.2.5-i386.dmg
open the resulting DMG file
open the gnuplot-4.2.3 DMG the Extras folder
drop Gnuplot.app into your applications folder
go to /usr/bin in terminal and do
$ sudo ln -sf "/Applications/Gnuplot.app/Contents/Resources/bin/
gnuplot"
You will be prompted to install X11 if you haven't done so, but after that if you run sample line like
python easy.py svmguide1 svmguide1.t
it should work. The sample files can be downloaded at http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#svmguide1
references: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
Make sure Homebrew is installed, then just run:
brew install gnuplot
Link the executable, so that it is in the PATH (i.e. /usr/bin) and can be found by the Python scripts:
sudo ln -s /opt/local/bin/gnuplot /usr/bin/gnuplot
After that's done, libsvm's Python scripts should not complain any longer.
Since macOS high sierra, /usr/bin is not modifyable by the user anymore, gnuplot is installed at /usr/local/bin instead. Open easy.py and change the path from "/usr/bin" to "/usr/local/bin"

How do I uninstall subversion on OS X

I did svn --version on command line and it says it is 1.17.10.
I want to uninstall it completely, so I can re-install 1.16.12
How do I do that in OS X?
Thanks
As said Mike Christensen, in order to uninstall it, you just need to delete the binary. Run which svn to know where your binary is installed.
In order to install subversion, you need to:
Download it.
Uncompress it (tar xzf subversion-1.x.y.tar.gz).
Compile it (./configure && make).
Install it (sudo make install).
I’m pretty sure this will install it in /usr/local/bin. So if you want svn to call the subversion you just installed (instead of the one built in XCode), you need to edit your $PATH so that /usr/local/bin is before /usr/bin. On Mac OS X, editing the path is done by editing the file /etc/paths.
Note that steps 3 and 4 requires a compiler and make. The easiest way to get those on Mac OS X is to install XCode.
If you get any error in following Etienne Miret solution so the following
after setp 3
brew install apr
brew install apr-util
/configure --with-apr=/usr/local/Cellar/apr/1.5.2_3/ --with-apr-util=/usr/local/Cellar/apr-util/1.5.4_4 && make
sudo make install
After completion, you can see the new SVN installed here
/usr/local/bin/svn --version

Need help in compiling lighttpd on MacOSx

I try download lighttpd 1.4.23 source, and compile it on MacOSX 10.5.5.
This is the error I am getting:
$ ./autogen.sh
./autogen.sh: running `libtoolize --copy --force'
./autogen.sh: line 19: libtoolize: command not found
I tried ask the same question on lighttpd forum, but I can't get any help there.
Thanks in advance.
libtoolize is part of GNU libtool, a package for building libraries portably. On the Mac, one option for getting it is to use MacPorts, a package manager which works in a similar fashion as Gentoo and FreeBSD, in that it compiles packages on your machine. See http://www.macports.org/install.php.
Beware, though, that it will be installed as glibtoolize, i.e. with a 'g' prefixed. That is a standard way to make GNU tools live in parallel with UNIX tools of the same name, that might be present (even though there isn't one in this particular case).
The command for installing libtool from MacPorts is: sudo port install libtool
Add a '-d' flag after the 'port' command to see the build output.
Here's what I use to install lighttpd 1.4.25 on Mac OS X 10.6.2. If I remember correctly, the same thing worked for me in a recent version of Mac OS X 10.5.
Install Xcode Developer Tools
Either install them from the DVD that came with your Mac (under Optional Installs) or download them from Apple's developer page.
Install PCRE
curl -O http://softlayer.dl.sourceforge.net/project/pcre/pcre/7.9/pcre-7.9.tar.gz
tar xzf pcre-7.9.tar.gz
cd pcre-7.9
./configure
make && sudo make install
cd ../
Install lighttpd
curl -O http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.25.tar.gz
tar xzf lighttpd-*.tar.gz
cd lighttpd-*
./configure
make && sudo make install
Note that the URLs above will quickly go out of date; you may need to download the latest versions of the .tar.gz packages from a different location.

Resources