ubuntu 16.04 Caffe2/PyTorch - CMake Error at third_party/protobuf/cmake/cmake_install.cmake:64

5760 단어 Caffe2PyTorch

ubuntu 16.04 Caffe2 / PyTorch - CMake Error at third_party/protobuf/cmake/cmake_install.cmake:64


1. compilation error

-- Install configuration: "Release"
CMake Error at third_party/protobuf/cmake/cmake_install.cmake:64 (file):
  file INSTALL cannot set permissions on
  "/home/yongqiang/Caffe2_install/pytorch/torch/lib/tmp_install/lib/pkgconfig/protobuf.pc"
Call Stack (most recent call first):
  cmake_install.cmake:79 (include)
  


Makefile:71: recipe for target 'install' failed
make: *** [install] Error 1
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-qnnpack nccl caffe2'

2. error - yongqiang@strong-sys:~/Caffe2_install/pytorch$ python setup.py build

yongqiang@strong-sys:~/Caffe2_install/pytorch$ python setup.py build
Building wheel torch-1.0.0a0+46ef2b2
running build
running build_deps
setup.py::build_deps::run()
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x /usr/bin/rsync ']'
+ SYNC_COMMAND='rsync -lptgoD'
+ CMAKE_COMMAND=cmake
++ command -v cmake3
+ [[ -x '' ]]
+ USE_CUDA=0
+ USE_ROCM=0
+ USE_NNPACK=0
+ USE_MKLDNN=0
+ USE_QNNPACK=0
+ USE_GLOO_IBVERBS=0
+ CAFFE2_STATIC_LINK_CUDA=0
+ RERUN_CMAKE=1
+ [[ 5 -gt 0 ]]
+ case "$1" in
+ USE_CUDA=1
+ shift
+ [[ 4 -gt 0 ]]
+ case "$1" in
+ USE_NNPACK=1
+ shift
+ [[ 3 -gt 0 ]]
+ case "$1" in
+ USE_QNNPACK=1
+ shift
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ break
+ CMAKE_INSTALL='make install'
+ BUILD_SHARED_LIBS=ON
......
......
......
[100%] Built target test_jit
Install the project...
-- Install configuration: "Release"
CMake Error at third_party/protobuf/cmake/cmake_install.cmake:64 (file):
  file INSTALL cannot set permissions on
  "/home/yongqiang/Caffe2_install/pytorch/torch/lib/tmp_install/lib/pkgconfig/protobuf.pc"
Call Stack (most recent call first):
  cmake_install.cmake:79 (include)
  


Makefile:71: recipe for target 'install' failed
make: *** [install] Error 1
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-qnnpack nccl caffe2'
yongqiang@strong-sys:~/Caffe2_install/pytorch$

3. error - yongqiang@strong-sys:~/Caffe2_install/pytorch$ python setup.py install

yongqiang@strong-sys:~/Caffe2_install/pytorch$ python setup.py install
Building wheel torch-1.0.0a0+46ef2b2
running install
setup.py::run()
running build_deps
setup.py::build_deps::run()
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x /usr/bin/rsync ']'
+ SYNC_COMMAND='rsync -lptgoD'
+ CMAKE_COMMAND=cmake
++ command -v cmake3
+ [[ -x '' ]]
+ USE_CUDA=0
+ USE_ROCM=0
+ USE_NNPACK=0
+ USE_MKLDNN=0
+ USE_QNNPACK=0
+ USE_GLOO_IBVERBS=0
+ CAFFE2_STATIC_LINK_CUDA=0
+ RERUN_CMAKE=1
+ [[ 5 -gt 0 ]]
+ case "$1" in
+ USE_CUDA=1
+ shift
+ [[ 4 -gt 0 ]]
+ case "$1" in
+ USE_NNPACK=1
+ shift
+ [[ 3 -gt 0 ]]
+ case "$1" in
+ USE_QNNPACK=1
+ shift
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ break
+ CMAKE_INSTALL='make install'
+ BUILD_SHARED_LIBS=ON
......
......
......
[100%] Built target ProcessGroupGlooTest
Install the project...
-- Install configuration: "Release"
CMake Error at third_party/protobuf/cmake/cmake_install.cmake:64 (file):
  file INSTALL cannot set permissions on
  "/home/yongqiang/Caffe2_install/pytorch/torch/lib/tmp_install/lib/pkgconfig/protobuf.pc"
Call Stack (most recent call first):
  cmake_install.cmake:79 (include)
  


Makefile:71: recipe for target 'install' failed
make: *** [install] Error 1
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-qnnpack nccl caffe2'
yongqiang@strong-sys:~/Caffe2_install/pytorch$

3. 솔루션 -yongqiang@strong-sys:~/Caffe2_install/pytorch$ sudo python setup.py install

yongqiang@strong-sys:~/Caffe2_install/pytorch$ sudo python setup.py install
[sudo] yongqiang  : 
Building wheel torch-1.0.0a0+46ef2b2
running install
setup.py::run()
running build_deps
setup.py::build_deps::run()
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x /usr/bin/rsync ']'
+ SYNC_COMMAND='rsync -lptgoD'
+ CMAKE_COMMAND=cmake
++ command -v cmake3
+ [[ -x '' ]]
+ USE_CUDA=0
+ USE_ROCM=0
+ USE_NNPACK=0
+ USE_MKLDNN=0
+ USE_QNNPACK=0
+ USE_GLOO_IBVERBS=0
+ CAFFE2_STATIC_LINK_CUDA=0
+ RERUN_CMAKE=1
+ [[ 5 -gt 0 ]]
+ case "$1" in
+ USE_CUDA=1
+ shift
+ [[ 4 -gt 0 ]]
+ case "$1" in
+ USE_NNPACK=1
+ shift
+ [[ 3 -gt 0 ]]
+ case "$1" in
+ USE_QNNPACK=1
+ shift
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ break
+ CMAKE_INSTALL='make install'
+ BUILD_SHARED_LIBS=ON
......
......
......
byte-compiling /usr/local/lib/python2.7/dist-packages/torch/version.py to version.pyc
running install_egg_info
running egg_info
writing torch.egg-info/PKG-INFO
writing top-level names to torch.egg-info/top_level.txt
writing dependency_links to torch.egg-info/dependency_links.txt
writing entry points to torch.egg-info/entry_points.txt
reading manifest file 'torch.egg-info/SOURCES.txt'
writing manifest file 'torch.egg-info/SOURCES.txt'
removing '/usr/local/lib/python2.7/dist-packages/torch-1.0.0a0+46ef2b2.egg-info' (and everything under it)
Copying torch.egg-info to /usr/local/lib/python2.7/dist-packages/torch-1.0.0a0+46ef2b2.egg-info
running install_scripts
Installing convert-caffe2-to-onnx script to /usr/local/bin
Installing convert-onnx-to-caffe2 script to /usr/local/bin
yongqiang@strong-sys:~/Caffe2_install/pytorch$

References


https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md

좋은 웹페이지 즐겨찾기