torch / torch7

http://torch.ch
Other
9k stars 2.38k forks source link

A problem when I install loadcaffe #999

Closed hhwhbf closed 7 years ago

hhwhbf commented 7 years ago

Hi,I attempt to use torch to run a program which need "loadcaffe",but when I use this command "luarocks install loadcaffe",the system show these error message.

Installing https://raw.githubusercontent.com/torch/rocks/master/loadcaffe-1.0-0.rockspec... Using https://raw.githubusercontent.com/torch/rocks/master/loadcaffe-1.0-0.rockspec... switching to 'build' mode 正克隆到 'loadcaffe'... remote: Counting objects: 18, done. remote: Compressing objects: 100% (17/17), done. remote: Total 18 (delta 0), reused 5 (delta 0), pack-reused 0 接收对象中: 100% (18/18), 19.28 KiB | 0 bytes/s, 完成. 检查连接... 完成。 cmake -E make_directory build; cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/tf802/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/tf802/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0"; make

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Torch7 in /home/tf802/torch/install -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find Protobuf (missing: PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.5/Modules/FindProtobuf.cmake:308 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:7 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/tmp/luarocks_loadcaffe-1.0-0-6537/loadcaffe/build/CMakeFiles/CMakeOutput.log". See also "/tmp/luarocks_loadcaffe-1.0-0-6537/loadcaffe/build/CMakeFiles/CMakeError.log". make: *** 没有指明目标并且找不到 makefile。 停止。

Error: Build error: Failed building.

well,I don't know how to solve this problem.Could you help me? Thanks. PS:I am a learner from China,this is why the message above contain Chinese character and my English presentation skill is limited.Thank you for your read and forgive.

albanD commented 7 years ago

The error message says it can't find the Protobuf library, Did you follow the installation instructions from loadcaffe ?

hhwhbf commented 7 years ago

@albanD wow,I forgot to execute "sudo apt-get install libprotobuf-dev protobuf-compiler" firstly but directly execute ''luarocks install loadcaffe''. Now the problem has been solved,thank you! It is really a pleasant experience writing an issue in github firstly.