我正在尝试用MacOS安装Homebrew
。但失败了。我从以下命令开始:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gdal --HEAD
brew install gdal —-only-dependencies
brew install gdal
pip3 install gdal
第一个命令检查我是否安装了Homebrew
。其他的则是逐步安装gdal
。当我尝试查看gdal
的版本时,它很有趣。
gdal-config --version
# out put: 3.0.2
但是当我试图用.tif将.raw转换为gdal_translate
时
gdal_translate –ot UInt16 –scale –of ENVI –outsize 1025 1025 srtm_59_05.tif heightmap.raw
出现了以下问题。
dyld[54967]: Library not loaded: @rpath/libpoppler.91.dylib
Referenced from: /Users/[my_username_here]/opt/anaconda3/lib/libgdal.26.dylib
Reason: tried: '/Users/[my_username_here]/opt/anaconda3/lib/libpoppler.91.dylib' (no such file),
'/Users/[my_username_here]/opt/anaconda3/bin/../lib/libpoppler.91.dylib' (no such file),
'/Users/[my_username_here]/opt/anaconda3/bin/../lib/libpoppler.91.dylib' (no such file),
'/usr/local/lib/libpoppler.91.dylib' (no such file), '/usr/lib/libpoppler.91.dylib' (no such file)
[1] 54967 abort gdal_translate –ot UInt16 –scale –of ENVI –outsize 1025 1025
我该怎么办?有人能帮我吗?
这个问题似乎来自于一个叫做poppler
的东西,所以我运行了
brew reinstall poppler
它给了我
Warning: poppler 21.12.0 is already installed and up-to-date.
To reinstall 21.12.0, run:
brew reinstall poppler
如果我重新安装poppler
,错误仍然存在。
下面是搜索poppler
文件夹的结果,使用
# locate the folder of poppler, gives "/opt/homebrew/Cellar/poppler/21.12.0"
brew ls --verbose poppler
# search for keyword "poppler" in filenames
find /opt/homebrew/Cellar/poppler/21.12.0 -name '*poppler*'
它给
/opt/homebrew/Cellar/poppler/21.12.0/.brew/poppler.rb
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/poppler_private_export.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/poppler-config.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-annot.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-page.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-attachment.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-features.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-enums.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-form-field.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-date.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-action.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-layer.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-movie.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-document.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-macros.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-structure-element.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/glib/poppler-media.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-form.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-export.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-optcontent.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-page-transition.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-annotation.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-qt6.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-link.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-version.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/qt6/poppler-media.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-page.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-image.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-global.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-font-private.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-page-transition.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-toc.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-document.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-rectangle.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-page-renderer.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-destination.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler_cpp_export.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-version.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-embedded-file.h
/opt/homebrew/Cellar/poppler/21.12.0/include/poppler/cpp/poppler-font.h
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-qt6.3.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/pkgconfig/poppler.pc
/opt/homebrew/Cellar/poppler/21.12.0/lib/pkgconfig/poppler-cpp.pc
/opt/homebrew/Cellar/poppler/21.12.0/lib/pkgconfig/poppler-glib.pc
/opt/homebrew/Cellar/poppler/21.12.0/lib/pkgconfig/poppler-qt6.pc
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-qt6.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-cpp.0.9.0.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler.a
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-glib.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-cpp.a
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-glib.8.22.0.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-qt6.3.1.0.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-cpp.0.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-glib.8.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler.116.0.0.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-cpp.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler.116.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler.dylib
/opt/homebrew/Cellar/poppler/21.12.0/lib/libpoppler-glib.a
/opt/homebrew/Cellar/poppler/21.12.0/share/pkgconfig/poppler-data.pc
/opt/homebrew/Cellar/poppler/21.12.0/share/poppler
发布于 2022-02-18 22:47:49
问题得到了解决:
作为https://github.com/OSGeo/gdal/issues/5348的问题。
,它看起来是Conda和自制的混合在你的系统中。也许试着关闭你的Conda环境。恐怕我帮不上忙了。
只是击落了Anaconda,用自制的东西重新做了所有的事情。
https://stackoverflow.com/questions/71178243
复制相似问题