- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试让 CaffeOnSpark 在本地运行,并且我按照 CaffeOnSpark wiki 上的此过程进行操作:https://github.com/yahoo/CaffeOnSpark/wiki/GetStarted_local
前 4 项对我来说很好。但是,当我在第 5 步中进行 Make 构建时。我在协议(protocol)上收到此错误:
整个错误堆栈:
jiaqi@jiaqi-ThinkPad-L450:~/github/CaffeOnSpark$ make build
cd caffe-public; make proto; make -j4 -e distribute; cd ..
make[1]: Entering directory '/home/jiaqi/github/CaffeOnSpark/caffe-public'
make[1]: Nothing to be done for 'proto'.
make[1]: Leaving directory '/home/jiaqi/github/CaffeOnSpark/caffe-public'
make[1]: Entering directory '/home/jiaqi/github/CaffeOnSpark/caffe-public'
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin
CXX/LD -o .build_release/tools/compute_image_mean.bin
CXX/LD -o .build_release/tools/caffe.bin
.build_release/tools/compute_image_mean.o: In function `std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)':
compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/compute_image_mean.o: In function `std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/compute_image_mean.o: In function `main':
compute_image_mean.cpp:(.text.startup+0x168): undefined reference to `google::SetUsageMessage(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
collect2: error: ld returned 1 exit status
Makefile:613: recipe for target '.build_release/tools/compute_image_mean.bin' failed
make[1]: *** [.build_release/tools/compute_image_mean.bin] Error 1
make[1]: *** Waiting for unfinished jobs....
.build_release/tools/convert_imageset.o: In function `std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
convert_imageset.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/convert_imageset.o: In function `main':
convert_imageset.cpp:(.text.startup+0x347): undefined reference to `google::SetUsageMessage(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
collect2: error: ld returned 1 exit status
Makefile:613: recipe for target '.build_release/tools/convert_imageset.bin' failed
make[1]: *** [.build_release/tools/convert_imageset.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
collect2: error: ld returned 1 exit status
Makefile:613: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make[1]: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
.build_release/tools/caffe.o: In function `std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
caffe.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/caffe.o: In function `main':
caffe.cpp:(.text.startup+0x50): undefined reference to `google::SetVersionString(std::string const&)'
caffe.cpp:(.text.startup+0x83): undefined reference to `google::SetUsageMessage(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
collect2: error: ld returned 1 exit status
Makefile:613: recipe for target '.build_release/tools/caffe.bin' failed
make[1]: *** [.build_release/tools/caffe.bin] Error 1
make[1]: Leaving directory '/home/jiaqi/github/CaffeOnSpark/caffe-public'
export LD_LIBRARY_PATH="/home/y/lib64:/home/y/lib64/mkl/intel64:/home/jiaqi/github/CaffeOnSpark/caffe-public/distribute/lib:/home/jiaqi/github/CaffeOnSpark/caffe-distri/distribute/lib:/usr/lib64:/lib64 "; mvn -B package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.yahoo.ml:caffe-grid:jar:0.1-SNAPSHOT
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] caffe
[INFO] caffe-distri
[INFO] caffe-grid
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building caffe 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building caffe-distri 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (proto) @ caffe-distri ---
[INFO] Executing tasks
protoc:
[exec] make[1]: Entering directory '/home/jiaqi/github/CaffeOnSpark/caffe-distri'
[exec] make[1]: Leaving directory '/home/jiaqi/github/CaffeOmake[1]: *** No rule to make target '../caffe-public/distribute/proto/caffe.proto', needed by 'src/main/java/caffe/Caffe.java'. nSpark/caffe-distri'
[exec] Stop.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] caffe .............................................. SUCCESS [ 0.019 s]
[INFO] caffe-distri ....................................... FAILURE [ 2.425 s]
[INFO] caffe-grid ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.144 s
[INFO] Finished at: 2016-05-13T12:33:40+08:00
[INFO] Final Memory: 9M/238M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (proto) on project caffe-distri: An Ant BuildException has occured: exec returned: 2
[ERROR] around Ant part ...<exec failonerror="true" dir="/home/jiaqi/github/CaffeOnSpark/caffe-distri" executable="make">... @ 5:97 in /home/jiaqi/github/CaffeOnSpark/caffe-distri/target/antrun/build-protoc.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :caffe-distri
Makefile:9: recipe for target 'build' failed
make: *** [build] Error 1
protoc 似乎找不到它的规则。您遇到过这个问题吗?请帮帮我!
我的协议(protocol)版本是2.5.0。
最佳答案
我之前遇到过 CaffeOnSpark 的构建错误。我知道这篇文章很旧,但无论如何它可能会对某人有所帮助。
从日志中我认为您存在一些依赖性问题。 CaffeOnSpark 需要满足 Caffe 的所有依赖项。所以我想问的第一个问题是 Caffe 是否工作(如果已安装)。
如果未安装 Caffe,您可以尝试安装 Caffe 并通过打开 python 并输入 import caffe
来验证其工作情况。如果 Caffe 不工作,请转到步骤 5。
如果 caffe 正在工作,请验证您是否执行了下载 git 的确切命令:
git 克隆 https://github.com/yahoo/CaffeOnSpark.git --recursive
然后请检查 CaffeOnSpark/caffe-public
中的 Makefile.config
。确保正确给出所有标志。检查完后,运行这些:
cd CaffeOnSpark
使干净
进行构建
如果您遇到此错误:
make[1]: Leaving directory `/home/das/CaffeOnSpark/caffe-public'
export LD_LIBRARY_PATH="/usr/local/cuda-7.5/lib64:/home/das/CaffeOnSpark/caffe-public/distribute/lib:/home/das/CaffeOnSpark/caffe-distri/distribute/lib:/usr/lib64:/lib64 "; mvn -B package -DskipTests
/bin/sh: 1: mvn: not found
make: *** [build] Error 127
运行此命令安装maven:
sudo apt-get install maven
如果仍然出现错误,您可能需要重新安装/再次检查依赖项。以防万一,我会发布说明。请注意,其中许多实际上并不是必需的。我安装这些来设置我的深度学习机器:
sudo apt-get update
sudo apt-get install -y build-essential cmake g++ gfortran git pkg-config python-dev software-properties-common
sudo apt-get install -y python-pip python-dev python-numpy python-scipy python-nose python-h5py python-skimage python-matplotlib python-pandas python-sklearn python-sympy
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev
并从 Caffe 根文件夹安装要求:
sudo pip install -r python/requirements.txt
如果存在 BLAS 问题,请正确安装:
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make FC=gfortran -j 4
sudo make PREFIX=/usr/local install
请确保 .bashrc
文件的所有路径均正确。
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export CAFFE_ROOT=/home/das/Caffe
export PYTHONPATH=$CAFFE_ROOT/python:$PYTHONPATH
export CAFFE_ON_SPARK=/home/das/CaffeOnSpark
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export HADOOP_HOME=/usr/local/hadoop
export SPARK_HOME=/usr/local/spark
export LD_LIBRARY_PATH=${CAFFE_ON_SPARK}/caffe-public/distribute/lib:${CAFFE_ON_SPARK}/caffe-distri/distribute/lib
..如果仍然存在错误,请发布它以便我们进行调查。
谢谢。
关于java - CaffeonSpark构建'src/main/java/caffe/Caffe.java需要caffe.proto错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37182575/
因此,当使用“智能”时,当我想创建一个类时,它还会创建另外两个函数(不确定我是否正确调用了它们): class main { private: /* data */ public: m
我确实知道 C/C++ 和 Java 中使用的 main() 方法,但由于 main() 是用户定义的(因为 main() 中的代码是由用户定义的,它不能是预定义的方法) & 在 C/C++ 中,ma
这个问题在这里已经有了答案: What is a NullPointerException, and how do I fix it? (12 个答案) 关闭 7 年前。 我意识到这是一个常见错误,
您好,我是 jquery 和 javascript 的新手。我想做的是我有 3 个独立的 Main-Divs ex main-div1, main-div2, main-div-3 它们都是一个大盒子
我知道以前曾有人问过有关此错误的问题,但我的情况与其他人不同。我正在编写计算数据集的平均值、方差和标准差的代码。编译代码时我没有收到任何错误,但是当我尝试运行代码时,我收到如下错误: Exceptio
这个问题已经有答案了: What should main() return in C and C++? (19 个回答) Why is the type of the main function in
无效的输入流不起作用 - 每次我给出负的月份值时,它都会返回此异常。 代码: import java.util.Scanner; public class Main { public stat
我在 main() 中调用 main(),递归 10 次。现在,在使用 gdb (bt/backtrace) 进行调试时,我没有看到 main() 的多个帧。为什么? #include int mai
我有一个类 - A - 没有方法,只有主要方法。 在其他类(class) - B - 我需要调用那个 main.做什么最好?从使用的资源、时间和功耗以及效率来看? 从类 A 创建一个“a”对象并执行
鉴于 documentation以及对 earlier question 的评论,根据要求,我制作了一个最小的可重现示例,演示了这两个语句之间的区别: my %*SUB-MAIN-OPTS = :na
我有一个在 main 中声明并初始化的数组,名为 Edges。 我还在 main 中声明了一些访问名为 Edges 的数组的函数。 代码编译并运行。 为什么它有效?我认为 main 中声明的变量不是全
如果定义内容主要部分的最具语义性和可访问性的方式是标准,那么使用 ARIA 地标似乎是多余的元素。正在添加 role="main"到元素真的有必要吗? 最佳答案 并非所有现代浏览器都已经映射了 ari
我是 C 语言的新手(6 小时前开始),我知道有大量的在线引用资料,我应该(并且将会)详细查看,但现在,我有紧急情况需要帮助。我有一个包含以下文件的项目文件夹: boundary_val.c boun
我正在审查许多不同的 Java 程序,并试图弄清楚如何只更新一次而不是两次更新对程序名称的引用。有没有办法在单个终端命令中使用变量? :S 我试图改进的命令是这样的形式: javac Main.jav
我已经创建了一个工作线程, Thread thread= new Thread(runnable); thread.start(); 我在工作线程中打印这个; Log.d("SessionTh
import java.awt.*; import java.awt.event.*; import java.io.*; import java.lang.*; public class Main
这是我的 Main.java,它位于服务器套接字“get().logger().tag();”之后的部分我已经在实例中添加了所有这些,我真的不确定它出了什么问题。 public class Main
我在 http://www.hackerearth.com/problem/algorithm/roys-life-cycle/ 上测试了我的程序。但是,我总是收到错误:在类 ActivityTime
我想要一个脚本来运行从模块导出的子例程,导出的子程序在脚本中作为 MAIN 运行。该子例程做了我想做的所有事情,除了它返回结果而不是打印它。 RUN-MAIN 似乎实现了我的大部分目标,但我不确定如何
java中有什么具体原因吗,main方法应该是小写字母 是的“主要”和“主要” 编译完成 public class ManiMethod { public static void main(S
我是一名优秀的程序员,十分优秀!