将libjpeg v8安装到/opt/local [英] Install libjpeg v8 to /opt/local

查看:108
本文介绍了将libjpeg v8安装到/opt/local的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在OSX上将libjpeg 8安装到/opt/local?我问的原因是,我想使用 MNE-C库.

How do I install libjpeg 8 to /opt/local on OSX? The reason I am asking is that I would like to create small movies of brain activity using the MNE-C libraries.

我执行了'mne_make_movie',导致出现以下错误:

I executed 'mne_make_movie' which results in the following error:

已选择电影制作(根据数据)...扫描 /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib找到插件 lqt_mjpeg.so ...从模块获取编解码器信息尝试加载 /用户/用户/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so ... dlopen失败 /用户/用户/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so: dlopen(/Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so, 2):库未加载:/opt/local/lib/libjpeg.8.dylib引用 来自:/Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so
原因:找不到图片错误:lqt_find_video_codec找不到 编解码器!

Movie production selected (from data)... Scanning /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib for plugins Found lqt_mjpeg.so...Getting codec info from module Trying to load /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so... dlopen failed for /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so: dlopen(/Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so, 2): Library not loaded: /opt/local/lib/libjpeg.8.dylib Referenced from: /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so
Reason: image not found ERROR: lqt_find_video_codec failed to find codecs!

由于所有内容均已编译,因此我认为无法更改'mne_make_movie'寻找libjpeg的位置.因此,我尝试使用Mac Ports(仅提供libjpeg-turbo)安装libjpeg.但是,然后出现另一个错误:

Since everything is already compiled I don't think I can change the location where 'mne_make_movie' is looking for libjpeg. So I tried installing libjpeg using Mac Ports, which only has libjpeg-turbo available. However, then I get another error:

已选择电影制作(根据数据)...扫描 /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib找到插件 lqt_mjpeg.so ...从模块获取编解码器信息尝试加载 /用户/用户/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so ... dlopen失败 /用户/用户/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so: dlopen(/Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so, 2):库未加载:/opt/local/lib/libjpeg.8.dylib引用 来自:/Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so
原因:库版本不兼容:lqt_mjpeg.so需要版本 13.0.0或更高版本,但是libjpeg.8.dylib提供了10.0.0版错误:lqt_find_video_codec找不到编解码器!

Movie production selected (from data)... Scanning /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib for plugins Found lqt_mjpeg.so...Getting codec info from module Trying to load /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so... dlopen failed for /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so: dlopen(/Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so, 2): Library not loaded: /opt/local/lib/libjpeg.8.dylib Referenced from: /Users/user/mne/MNE-2.7.4-3420-MacOSX-x86_64/lib/lqt_mjpeg.so
Reason: Incompatible library version: lqt_mjpeg.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 10.0.0 ERROR: lqt_find_video_codec failed to find codecs!

Mac Ports似乎没有更新的版本.

A more up to date version does not seem to be available on Mac Ports.

在libjpeg的官方网站上,我下载了版本8d的源代码并遵循安装说明.这会将所有内容安装到/usr/local.我不熟悉makefile,也不知道要更改所有内容才能正确地将所有内容安装到/opt/local.

On the official website of libjpeg I downloaded the source for version 8d and followed the install instructions. This would install everything to /usr/local. I am not familiar with makefiles and don't know what I have to alter to install everything correctly to /opt/local.

那么如何将libjpeg 8版本13.0.0或更高版本安装到/opt/local?

So how do I install libjpeg 8 version 13.0.0 or greater to /opt/local?

P.S .: Homebrew似乎不适用,因为它没有安装到/opt/local(不建议将其更改为/opt/local),并且libjpeg 9似乎是唯一可用的版本.

P.S.: Homebrew does not seem applicable since it does not install to /opt/local (and it is not recommended to change it to /opt/local) and libjpeg 9 seems to be the only version available.

推荐答案

如果您不太使用命令行构建工具,或者您最近升级了macOS,则可能需要先下载Xcode命令行工具你先来.如果您已经拥有它们,则不会造成任何伤害.命令是:

If you don't use command-line build tools much, or you have recently upgraded macOS, you will probably need to download the Xcode command-line tools before you start. It won't do any harm if you already have them. The command is:

xcode-select --install

然后,以下内容应该可以工作,尽管我尚未对其进行测试,所以您可能希望一次将一行复制并粘贴到您的终端中:

Then the following should work, though I have not tested it, so you may like to copy and paste one line at a time into your Terminal:

curl -O -J -L http://www.ijg.org/files/jpegsrc.v8.tar.gz
tar xvfz jpeg*tar.gz                 # Unzip and untar what you downloaded
cd jpeg-8                            # Change directory to wherever it unpacked to
./configure --prefix="/opt/local"    # Configure with the necessary prefix
make
make install

您可能需要在最后一行的前面加上sudo.

You may need to prefix the last line with sudo.

这篇关于将libjpeg v8安装到/opt/local的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆