无法安装avconv/libav

6
我在OS X Mavericks上安装libav毫无进展。我已经尝试了所有方法。我正在按照以下指南进行:http://earthwithsun.com/questions/568464/install-latest-libav-avconv-on-osx。在进行macport依赖项检查后,一切正常,然后我运行了以下命令:
./configure \
--enable-gpl --enable-libx264 --enable-libxvid \
--enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-nonfree --enable-libfaac \
--enable-libmp3lame --enable-libspeex --enable-libvorbis --enable-libtheora --enable-libvpx \
--enable-libopenjpeg --enable-libfreetype --enable-doc --enable-gnutls --enable-shared

出现以下错误:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
ERROR: gnutls not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
libav-tools@libav.org mailing list or IRC #libav on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

错误:未找到 gnutls

在运行 configure 前,我已将头文件路径添加到环境中,但仍然没有成功。

export CFLAGS="-I/opt/local/include -L/opt/local/lib"
export CXXFLAGS="-I/opt/local/include -L/opt/local/lib"

有人能帮忙吗?

3个回答

16

"brew install libav"难道不能满足您的需求吗?


那个给了我错误信息 Error: No available formula for libav。我使用的是 Mac OSX 10.8.5。 - John
我也试过了,有效。 - Qadir Hussain

2

我和你一样遇到了同样的错误。你需要安装gnutls。

我在这里找到了一篇教程:https://gist.github.com/morgant/1753095

以下是适用于我的完整命令列表(OSX 10.6):

cd ~/Desktop
mkdir wget-build
cd wget-build
curl -O ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
tar xjf gmp-5.0.2.tar.bz2
pushd gmp-5.0.2
CC=gcc-4.2 CXX=g++4.2 ./configure --prefix=/usr/local
make
sudo make install
popd
curl -O http://www.lysator.liu.se/~nisse/archive/nettle-2.4.tar.gz
tar xzf nettle-2.4.tar.gz
pushd nettle-2.4
CFLAGS="-m64" ./configure --prefix=/usr/local --disable-assembler
make
sudo make install
popd
curl -O http://ftp.gnu.org/gnu/gnutls/gnutls-2.12.12.tar.bz2
tar xjf gnutls-2.12.12.tar.bz2
pushd gnutls-2.12.12
CFLAGS="-m64" CXXFLAGS="-m64" ./configure --prefix=/usr/local --without-p11-kit
make
sudo make install
popd

您也可以尝试使用Brew (http://brew.sh/),并通过以下方式安装gnutls:
 brew install gnutls

最后,我找到了一种对我有效的第三种方法:

curl -O http://libav.org/releases/libav-10.1.tar.gz
tar xjf libav-10.1.tar.gz
cd libav-10.1
./configure
make install

Enjoy !


0

重新安装后,它对我起作用了:

使用以下命令从您的 Mac 中删除 brew:$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

然后再次安装它:$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接