Linux 中的谷歌 protobuf
我正在使用 protobuf 和 Linux。它的编译器protoc在哪里?我已经从主站点下载了该软件包,并成功编译并安装了它,但我找不到 protoc
来构建我自己的格式文件。它在哪里?
更新 这是我构建 protobuf 的文件夹:
aclocal.m4 depcomp Makefile.in
autogen.sh editors missing
CHANGES.txt examples protobuf-lite.pc
config.guess generate_descriptor_proto.sh protobuf-lite.pc.in
config.h gtest protobuf.pc
config.h.in install-sh protobuf.pc.in
config.log INSTALL.txt python
config.status java README.txt
config.sub libtool src
configure ltmain.sh stamp-h1
configure.ac m4 vsprojects
CONTRIBUTORS.txt Makefile
COPYING.txt Makefile.am
没有我需要的二进制文件。
I'm working with protobuf and Linux. Where is its compiler protoc
? I've downloaded the package from the main site, compiled and installed it successfully but I can't find protoc
to build my own format file. Where is it?
UPDATE
Here is folder where I built protobuf:
aclocal.m4 depcomp Makefile.in
autogen.sh editors missing
CHANGES.txt examples protobuf-lite.pc
config.guess generate_descriptor_proto.sh protobuf-lite.pc.in
config.h gtest protobuf.pc
config.h.in install-sh protobuf.pc.in
config.log INSTALL.txt python
config.status java README.txt
config.sub libtool src
configure ltmain.sh stamp-h1
configure.ac m4 vsprojects
CONTRIBUTORS.txt Makefile
COPYING.txt Makefile.am
There isn't a binary file I need.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
它可能安装在
/usr/local/bin
中,至少在 Ubuntu 上,您可以使用
apt-get install protobuf-compiler
来代替。从 INSTALL.txt 中:
It's probably installed into
/usr/local/bin
On Ubuntu at least, you can
apt-get install protobuf-compiler
instead.From the INSTALL.txt:
首先,您需要从 protobuff(在根文件夹中)编译源代码:
第二:
第三:
阅读根文件夹中的 README.txt 以获取更多信息。
First, you need to compile you source code from protobuff (in the root folder):
Second:
Third:
Read README.txt in root folder for more info.
另外,如果您实际上使用的是 Ubuntu,那么如果您想要比上次截止时间(对于 Ubuntu 9.10 来说是去年夏末的某个时间)更新的软件包,您还可以从 Debian stable 获取源软件包并在本地重建它们。这样,您最终会得到 .deb 软件包,并保留正常的升级路径(而不是在 /usr/local 中乱扔一次性安装)。
Also, if you are in fact on Ubuntu, then you can also fetch the source package from Debian unstable and rebuild them locally if you want packages that are more current than the last cutoff (which for Ubuntu 9.10 was some time late last summer). That way you end up with .deb packages and you preserve a normal upgrade path (rather than littering /usr/local with one-off installs).
您可以在您设置的路径中找到protoc ./configure --prefix=you_path。
当你 make install 成功后,它会在该路径中包含 bin、include 和 lib。
You can find protoc in the path which you set ./configure --prefix=you_path.
When you make install successful, it will general bin, include and lib in that path.
事实上你不需要知道它的位置。
您所需要做的就是打开原始文件所在的终端并在终端上写入,
请按照此链接获取文档
Actually you don't need to know it's place.
All you want is to open terminal where your proto file is located and write at terminal
follow this link for documentation