1
我正在學習機器學習,最近我發生這種情況:Wide-Area Image Geolocalization with Aerial Reference Imagery 。無法安裝Caffe的「Boost」前提條件
這是一個網絡,可以從圖像中預測圖像的GPS位置。不用說,我很高興,卻發現其中一個要求:
import glob
import caffe
import numpy as np
import multiprocessing
import matplotlib.pyplot as plt
from collections import defaultdict
是來自Caffe,我似乎無法安裝,因爲我無法安裝主要前提是:Boost
我第一次嘗試運行標準sudo apt-get install libboost-all-dev
,這不僅失敗:
The following packages have unmet dependencies:
libboost-all-dev : Depends: libboost-chrono-dev but it is not going to be installed
Depends: libboost-date-time-dev but it is not going to be installed
Depends: libboost-filesystem-dev but it is not going to be installed
Depends: libboost-graph-dev but it is not going to be installed
Depends: libboost-graph-parallel-dev but it is not going to be installed
Depends: libboost-iostreams-dev but it is not going to be installed
Depends: libboost-log-dev but it is not going to be installed
Depends: libboost-mpi-dev but it is not going to be installed
Depends: libboost-mpi-python-dev but it is not going to be installed
Depends: libboost-program-options-dev but it is not going to be installed
Depends: libboost-python-dev but it is not going to be installed
Depends: libboost-regex-dev but it is not going to be installed
Depends: libboost-serialization-dev but it is not going to be installed
Depends: libboost-system-dev but it is not going to be installed
Depends: libboost-thread-dev but it is not going to be installed
Depends: libboost-wave-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
它給了我一個「但它不會被安裝」的錯誤。然後我試圖從源代碼安裝:
wget -O boost_1_55_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
tar xzvf boost_1_55_0.tar.gz
cd boost_1_55_0/
./bootstrap.sh --prefix=/usr/local
./b2
而且,及時用g ++錯誤填滿了我的整個終端。然後我試圖從頭開始:
sudo apt-get --purge remove libboost-all-dev libboost-dev libboost-doc
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update
sudo apt-get install libboost1.54-dev
儘管這與測試腳本工作:How to Install boost on Ubuntu?
當我試圖然後make
朱古力,我得到這個:
CXX src/caffe/util/db.cpp
In file included from ./include/caffe/common.hpp:19:0,
from ./include/caffe/util/db.hpp:6,
from src/caffe/util/db.cpp:1:
./include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: No such file or directory
#include <cublas_v2.h>
^
compilation terminated.
make: *** [.build_release/src/caffe/util/db.o] Error 1
這裏有什麼問題?
好了,它說「'#CPU-only開關(取消註釋以不支持GPU的構建)''我是否取消註釋兩條線,或者只有一條? – Rich
只有一個。看到回答編輯 – Vtik
不要忘記接受答案,如果它解決了你原來的問題。謝謝 – Vtik