Tôi đang cố gắng để tái tạo một ví dụ hướng dẫn trong tài liệu pyLearn2. Khi tôi chạy
python make_dataset.py
, trong ví dụ này, tôi đã nhận lỗi này:Compilation lỗi ld: thư viện không tìm thấy cho -lgcc_ext trong MacOSX11:17 $ python make_dataset.py /Users/user/pylearn2/pylearn2/utils/image.py:16: UserWarning: Unable to import matplotlib. Some features unavailable. Original exception: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-intel.egg/matplotlib/backends/_macosx.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
tham chiếu từ: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Dự kiến trong:
/usr/local/lib/libjpeg.8.dylib
Tôi có thể nhập
matplotlib
và hình ảnh trong python trong dòng lệnh. Ai đó có thể giúp tôi hiểu những gì nó đang phàn nàn và cách sửa lỗi?Một vấn đề khác (mà có thể hoặc không thể liên quan đến vấn đề trên) là một lỗi liên kết
Vấn đề xảy ra trong biên soạn với các dòng lệnh dưới đây:
g++ -dynamiclib -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -march=core-avx-i -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=core-avx-i -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -undefined dynamic_lookup -I/Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -o /Users/user/.theano/compiledir_Darwin-13.2.0-x86_64-i386-64bit-i386-2.7.5-64/tmpBdy9w9/49d70155ef39a124cbfa83c600416644.so /Users/user/.theano/compiledir_Darwin-13.2.0-x86_64-i386-64bit-i386-2.7.5-64/tmpBdy9w9/mod.cpp -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib ld: library not found for -lgcc_ext.10.5 collect2: error: ld returned 1 exit status Exception: ('The following error happened while compiling the node', InplaceDimShuffle{x,0}(mean), '\n', 'Compilation failed (return status=1): ld: library not found for -lgcc_ext.10.5. collect2: error: ld returned 1 exit status. ', '[InplaceDimShuffle{x,0}(mean)]')
Tôi đang chạy
pyLearn2
trên Mac OSX Mavericks. Tôi không chắc chắn làm thế nào để sửa lỗi: thư viện có vẻ là trong hệ thống của tôi ở một số nơi:/usr/local/Cellar/gcc47/4.7.3/lib/gcc/x86_64-apple-darwin13.0.0/4.7.3/libgcc_ext.10.5.dylib /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgcc_ext.10.5.dylib /usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.7.3/libgcc_ext.10.5.dylib
Tôi không chắc chắn mà một trong những liên kết và làm thế nào tôi nên liên kết.
Tôi đã thay đổi (thêm) đường dẫn đến
DYLD_LIBRARY_PATH
không khắc phục được sự cố.Mọi trợ giúp sẽ được đánh giá cao.
Trả lời
Dường như one possible solution là để tự tạo một liên kết đến tập tin .dylib:
sudo ln -sf /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib /opt/local/lib/libGL.dylib
sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib /opt/local/lib/libpng.dylib
sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib /opt/local/lib/libtiff.dylib
sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib /opt/local/lib/libjpeg.dylib
Why does this work? Because for whatever reason, when Apple requests libJPEG.dyld, whatever system searches for it finds /opt/local/lib/libjpeg.dyld because the search is case insensitive. For a Unix operating system. Go figure. The lines above will force any program looking for libjpeg.dyld to be redirected to Apple's libJPEG.dyld.
Một người dùng khác đề nghị setting DYLD_FALLBACK_LIBRARY_PATH:
You could also use DYLD_FALLBACK_LIBRARY_PATH. I had to use that to avoid Apple's libJPEG getting in the way of apps that expected the libjpeg port. See the man page for dlopen() for details.
- 1. ld: không tìm thấy thư viện nào cho -GoogleAnalytics
- 2. ld: không tìm thấy thư viện cho -lz.1.2.3
- 3. ld: không tìm thấy thư viện nào cho -GoogleToolboxForMac
- 4. ld: thư viện không tìm thấy cho -lz
- 5. "/ usr/bin/ld: không thể tìm thấy thư viện"
- 6. ld không thể tìm thấy thư viện hiện có
- 7. GHC bất kỳ kết quả nào trong "ld: thư viện không được tìm thấy cho -lgmp"
- 8. Xcode "ld: không tìm thấy thư viện [...] cho kiến trúc x86_64"
- 9. thư viện xcode không tìm thấy
- 10. gcc/usr/bin/ld: lỗi: không thể tìm thấy -lncurses
- 11. WFPSampler Compilation - không wfpcalloutsclassreg tìm thấy
- 12. Lỗi trình liên kết Xcode: không tìm thấy thư viện cho -lAdMobDevice
- 13. Thêm Firestore tạo lỗi ld: framework không tìm thấy GRPCClient
- 14. "ld: không tìm thấy thư viện cho -lXYZ" nghĩa là gì? Khả năng khác nhau là gì?
- 15. Lỗi khi cài đặt mysql-python: không tìm thấy thư viện cho -lssl
- 16. ld: thư viện không tìm thấy cho -lcrt0.o trên OSX 10,6 với gcc/kêu vang cờ -static
- 17. Không tìm thấy thư viện nào cho -lcommonCrypto
- 18. Thư viện QWebView không được tìm thấy
- 19. Thư viện "libmaliinstr.so" không tìm thấy
- 20. ld không thể tìm thấy udev
- 21. Không tìm thấy nguồn thư viện cho thư viện scala trong Intellij
- 22. lỗi khi cài đặt psycopg2, thư viện không tìm thấy cho -lssl
- 23. vấn đề ld liên kết:/usr/bin/ld: không thể tìm thấy [libraryname]
- 24. không thể tìm thấy thư viện ssl?
- 25. thư viện "libmaliinstr.so" không tìm thấy .... trong eclipse
- 26. /usr/bin/ld không thể tìm thấy lbsd
- 27. Thư viện trong/usr/local/lib không tìm thấy
- 28. Không tìm thấy GoogleSignIn trong thư viện auth
- 29. MonoTouch Xây dựng: ld: (các) biểu tượng không tìm thấy cho kiến trúc armv7
- 30. Lỗi biên dịch OCaml:/usr/bin/ld: không thể tìm thấy -lstr