編譯Caffe時開啟cudnn常見問題
執行時找不到cudnn庫
caffe: error while loading shared libraries: libcudnn.so.5
解決辦法
修改LD_LIBRARY_PATH
export LD_LIBRARY_PATH=(your path that contains libcudnn.so)
編譯時inline函式出錯
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ CMake Error at cuda_compile_generated_sgd_solver.cu.o.cmake:266 (message): Error generating file /opt/caffe/build/src/caffe/CMakeFiles/cuda_compile.dir/solvers/./cuda_compile_generated_sgd_solver.cu.o
解決辦法
Change the $(CXXFLAGS) and $(CFLAGS) in Makefile:
CXXFLAGS+= -D_FORCE_INLINES
CFLAGS+= -D_FORCE_INLINES
編譯Python出錯
fatal error: numpy/arrayobject.h: No such file or directory ; when 'make pycaffe' command given
解決辦法
- 檢查numpy是否正確安裝
sudo apt-get install python-numpy
- 如果numpy已經安裝,修改Makefile.config, 檢查numpy庫的安裝Path是否一致,例如我的python numpy安裝path要改為:
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/local/lib/python2.7/dist-packages/numpy/core/include
相關文章
- CUDA常見編譯器配置問題一覽編譯
- caffe make 編譯編譯
- [譯] HTTP/2 常見問題解答HTTP
- PHP編譯安裝時常見錯誤解決辦法,php編譯常見錯誤PHP編譯
- React Native babel編譯異常問題React NativeBabel編譯
- [譯] Go 程式碼評審常見問題Go
- PHP編譯configure時常見錯誤,和PHP7.1.4 編譯安裝PHP編譯
- 網路爬蟲編寫常見問題爬蟲
- opencv 編譯常見錯誤OpenCV編譯
- 學習WebFlux時常見的問題WebUX
- 常見問題
- MongoDB常見問題解答:時間與時區MongoDB
- DDC/NFT開發常見問題
- 近期BSN開發常見問題
- Ubuntu 16 04 編譯 Caffe SSDUbuntu編譯
- CMake編譯Qt工程時的問題編譯QT
- Flink Checkpoint超時問題常見排查思路
- js常見問題JS
- Homestead 常見問題
- Apache 常見問題Apache
- Linux 常見問題Linux
- Git 常見問題Git
- PHP 常見問題PHP
- swiper常見問題
- Composer 常見問題
- HTML常見問題HTML
- Git常見問題Git
- 前端常見問題前端
- 【Nginx】常見問題Nginx
- ndk 常見問題
- CSS常見問題CSS
- nginx 常見問題Nginx
- Mysql:常見問題MySql
- XSS常見問題
- MyBatis常見問題MyBatis
- java 常見問題Java
- react-native開發常見問題React
- Laravel 個人開發常見問題Laravel
- DDC開發常見問題答疑(二)