我在尝试使用 Mac Ports 安装 vsftpd 时遇到了 libjpeg-turbo 的问题。我在 OS X 10.10.5 上运行。
David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$ conda -V
conda 3.16.0
David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$
David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$ port -v
MacPorts 2.3.3
sudo port install vsftpd
Password:
---> Fetching archive for vsftpd
---> Attempting to fetch vsftpd-3.0.2_1.darwin_14.x86_64.tbz2 from http://packages.macports.org/vsftpd
---> Attempting to fetch vsftpd-3.0.2_1.darwin_14.x86_64.tbz2.rmd160 from http://packages.macports.org/vsftpd
---> Installing vsftpd @3.0.2_1
---> Activating vsftpd @3.0.2_1
To configure vsftpd edit /opt/local/etc/vsftpd.conf.
---> Cleaning vsftpd
---> Updating database of binaries
---> Scanning binaries for linking errors
---> Found 99 broken file(s), matching files to ports
---> Found 14 broken port(s), determining rebuild order
---> Rebuilding in order
tiff @4.0.4
gd2 @2.1.1 +x11
ghostscript @9.16 +x11
djvulibre @3.5.27
webp @0.4.3
jasper @1.900.1
gdk-pixbuf2 @2.31.6 +x11
opencv @3.0.0
lcms @1.19
libmng @1.0.10
netpbm @10.71.02 +x11
lcms2 @2.7
ImageMagick @6.9.0-0 +x11
poppler @0.35.0
Error: Unable to exec port: Can't install jpeg because conflicting ports are active: libjpeg-turbo
Error rebuilding tiff
while executing
"error "Error rebuilding $portname""
(procedure "revupgrade_scanandrebuild" line 395)
invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
(procedure "macports::revupgrade" line 5)
invoked from within
"macports::revupgrade $opts"
(procedure "action_revupgrade" line 2)
invoked from within
"action_revupgrade $action $portlist $opts"
(procedure "action_target" line 96)
invoked from within
"$action_proc $action $portlist [array get global_options]"
(procedure "process_cmd" line 103)
invoked from within
"process_cmd $remaining_args"
invoked from within
"if { [llength $remaining_args] > 0 } {
# If there are remaining arguments, process those as a command
set exit_status [process_cmd $remaining..."
(file "/opt/local/bin/port" line 5268)
今天早些时候,我在使用 python-goose 时遇到了类似的问题:
David-Laxers-MacBook-Pro:python-goose davidlaxer$ anaconda search -t conda libjpg
Traceback (most recent call last):
File "/users/davidlaxer/anaconda/bin/anaconda", line 6, in <module>
sys.exit(main())
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/binstar_client/scripts/cli.py", line 94, in main
description=__doc__, version=version)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/binstar_client/scripts/cli.py", line 60, in binstar_main
add_subparser_modules(parser, sub_command_module, 'conda_server.subcommand')
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/clyent/__init__.py", line 117, in add_subparser_modules
for command_module in get_sub_commands(module):
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/clyent/__init__.py", line 106, in get_sub_commands
this_module = __import__(module.__package__ or module.__name__, fromlist=names)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/binstar_client/commands/notebook.py", line 13, in <module>
from binstar_client.utils.notebook import Uploader, Downloader, parse, notebook_url, has_environment
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/binstar_client/utils/notebook/__init__.py", line 10, in <module>
from .uploader import *
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/binstar_client/utils/notebook/uploader.py", line 7, in <module>
from .data_uri import data_uri_from
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/binstar_client/utils/notebook/data_uri.py", line 10, in <module>
from PIL import Image
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/PIL/Image.py", line 63, in <module>
from PIL import _imaging as core
ImportError: dlopen(/Users/davidlaxer/anaconda/lib/python2.7/site-packages/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/anaconda/lib/python2.7/site-packages/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
Continuum Analytics 给了我这些说明(解决了“鹅”问题):
conda install -f pillow jpeg
I was unable to find any details of a jpeg package that has _imaging.so 13. My suggestion from here may be to reinstall goose. I did so by the following. first download the zip from https://github.com/grangier/python-goose and run the following individually.
conda create -n goose python=2.7 anaconda-client pillow lxml cssselect nltk
source activate goose
pip install -i https://pypi.anaconda.org/pypi/simple jieba
conda install -fc https://conda.anaconda.org/auto beautifulsoup4
Then move the contents of the python-goose-develop/ into the goose environment, similar to this.
cp ~/Downloads/python-goose-develop/* ~/anaconda/envs/goose
cd ~/anaconda/envs/goose
python setup.py install
回应来自 dsgfdg 的以下“答案”。
David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$ sudo !!
sudo port install webp
---> Computing dependencies for webp
Error: Unable to execute port: Can't install jpeg because conflicting ports are active: libjpeg-turbo
我下载了 Pillow 2.3.1 并构建了它。
它构建成功,但测试失败。这是摘录。
David-Laxers-MacBook-Pro:Pillow-2.3.1 davidlaxer$ python Tests/run.py
--------------------------------------------------------------------
running test_000_sanity ...
=== error 256
Traceback (most recent call last):
File "Tests/test_000_sanity.py", line 5, in <module>
import PIL.Image
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
running test_001_archive ...
=== error 256
Traceback (most recent call last):
File "Tests/test_001_archive.py", line 2, in <module>
import PIL.Image
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
running test_file_bmp ...
=== error 256
Traceback (most recent call last):
File "Tests/test_file_bmp.py", line 3, in <module>
from PIL import Image
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
running test_file_eps ...
=== error 256
Traceback (most recent call last):
File "Tests/test_file_eps.py", line 3, in <module>
from PIL import Image, EpsImagePlugin
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
running test_file_fli ...
=== error 256
Traceback (most recent call last):
File "Tests/test_file_fli.py", line 3, in <module>
from PIL import Image
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
running test_file_gif ...
=== error 256
Traceback (most recent call last):
File "Tests/test_file_gif.py", line 3, in <module>
from PIL import Image
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
...
导入错误:dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2):库未加载:libjpeg.8 .dylib
引用自:/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
原因:不兼容的库版本:_imaging.so 需要 13.0.0 或更高版本,但 libjpeg.8.dylib 提供 12.0.0 版本
-------------------------------------------------- ------------------
*** 94 个测试失败了 94 个。
David-Laxers-MacBook-Pro:Pillow-2.3.1 davidlaxer$
David-Laxers-MacBook-Pro:scraper davidlaxer$ python scraper.py
Traceback (most recent call last):
File "scraper.py", line 8, in <module>
from goose import Goose
File "/users/davidlaxer/anaconda/lib/python2.7/site-packages/goose/__init__.py", line 27, in <module>
from goose.crawler import CrawlCandidate
File "/users/davidlaxer/anaconda/lib/python2.7/site-packages/goose/crawler.py", line 31, in <module>
from goose.images.extractors import UpgradedImageIExtractor
File "/users/davidlaxer/anaconda/lib/python2.7/site-packages/goose/images/extractors.py", line 28, in <module>
from goose.images.utils import ImageUtils
File "/users/davidlaxer/anaconda/lib/python2.7/site-packages/goose/images/utils.py", line 26, in <module>
from PIL import Image
File "build/bdist.macosx-10.5-x86_64/egg/PIL/Image.py", line 53, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/PIL/_imaging.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so, 2): Library not loaded: libjpeg.8.dylib
Referenced from: /Users/davidlaxer/.python-eggs/Pillow-2.3.1-py2.7-macosx-10.5-x86_64.egg-tmp/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
最佳答案
问题是 MacPorts 中的 libjpeg-turbo
和 jpeg
端口都提供了 libjpeg.dylib
和相应的头(因此,它们相互冲突,无法同时安装),但是 jpeg
端口附带 libjpeg.9.dylib
,与 libjpeg-turbo
的 libjpeg.8.dylib
ABI 不兼容.
问题不是安装vsftpd
端口引起的;相反,MacPorts 在每次安装或更新后运行一个名为 rev-upgrade
的健全性检查,以检查 ABI 兼容性问题,例如引用不存在或不兼容的库。当它检测到此类问题(如您的情况)时,它会尝试重建损坏的端口以解决问题。
此完整性检查确定您的 tiff
端口已损坏,因为其二进制文件或库之一与 libjpeg.9.dylib
链接——此文件不存在,因为它由 jpeg
端口提供,但您只安装了 libjpeg-turbo
。然后重建尝试将 jpeg
端口安装为 tiff
的依赖项,但由于冲突而失败。
此时您有多种选择:
libjpeg-turbo
并安装 jpeg
。这应该可以解决您的问题,但如果您出于某种原因不明确想要 libjpeg-turbo
,这只是一个选项。 jpeg
端口的端口,并重建那些将接受 libjpeg-turbo
作为 libjpeg.dylib
库提供者的端口;不幸的是,tiff
端口目前不在其中:$> port info --depends_lib tiff
depends_lib: port:jpeg, port:xz, port:zlib
如果它支持两个版本,这将包含
path:lib/libjpeg.dylib:jpeg
。一项快速调查表明,目前 MacPorts 中只有极少数端口支持 libjpeg-turbo
以提供 JPEG 功能。这在 future 可能会改变(事实上,最近在邮件列表上有一个关于这个的讨论)。 TL;DR:
sudo port -f uninstall libjpeg-turbo
sudo port install jpeg
sudo port rev-upgrade
关于python - 无法安装 jpeg,因为冲突端口处于事件状态 : libjpeg-turbo,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32281830/