Suse Linux Enterprise 12下编译protocol buffer并生成python binding
2014-11-06 19:57
781 查看
安装完suse linux enterprise 12后,我就急不及待的要开始安装protocol buffer了
git clone https://github.com/google/protobuf.git
进入protobuf,执行autogen.sh
会生成 configure
然后configure --prefix=/path/to/installation/directory; make -j4; make install -j4
比较棘手的是生成python的binding
进入python目录
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
python setup.py build
python setup.py install --cpp_implementation --prefix=/path/to/python/installation/directory
报错,说Python.h找不到
mount SLE-12-Server-DVD-x86_64-GM-DVD2.iso 到某一个目录
rpm2cpio /mounted/path/suse/src/python-2.7.7-2.12.src.rpm | cpio -idmv
export CFLAGS=-I/path/to/extracted/directory/Python-2.7.7/Include
ln -s /usr/lib64/libpython2.7.so.1.0 libpython2.7.so
export LDFLAGS=-L/path/to/extracted/directory
git clone https://github.com/google/protobuf.git
进入protobuf,执行autogen.sh
会生成 configure
然后configure --prefix=/path/to/installation/directory; make -j4; make install -j4
比较棘手的是生成python的binding
进入python目录
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
python setup.py build
python setup.py install --cpp_implementation --prefix=/path/to/python/installation/directory
报错,说Python.h找不到
mount SLE-12-Server-DVD-x86_64-GM-DVD2.iso 到某一个目录
rpm2cpio /mounted/path/suse/src/python-2.7.7-2.12.src.rpm | cpio -idmv
export CFLAGS=-I/path/to/extracted/directory/Python-2.7.7/Include
ln -s /usr/lib64/libpython2.7.so.1.0 libpython2.7.so
export LDFLAGS=-L/path/to/extracted/directory
相关文章推荐
- SUSE Linux Enterprise Serve 12 试用体验
- SUSE Linux Enterprise 11 SP3 成功编译安装GCC 4.8.2
- linux下如何编译python生成libpython2.5.so动态库
- windows安装SUSE Linux Enterprise Server 12
- ASP.NET Core 2.0 MVC 发布部署--------- SUSE 16 Linux Enterprise Server 12 SP2 X64 具体操作
- Suse Linux Enterprise 12 防火墙开放服务及端口
- SUSE Linux Enterprise Server 12 (x86_64) rpm方式 安装gcc
- SUSE Linux Enterprise 12 系统安装
- SUSE Linux Enterprise 11 SP3 成功编译LLVM + Clang 3.4
- Suse Linux Enterprise 12 配置 eth0 eth1
- Clouder CDH 5.9 安装 (SuSE Linux Enterprise 12 SP1)
- SUSE Enterprise Linux Desktop 12
- 解决Putty下显示Suse Linux Enterprise 12 yast2的乱码问题
- 使用 Visual Studio 部署 .NET Core 应用 ——.Net Core 部署到SUSE Linux Enterprise Server 12 SP2 64 位(GNOME 版本3.20.2)
- Installation of SUSE Linux Enterprise Server 12
- Linux下编译安装OpenCV(基于C++,生成so库供python调用)
- SUSE Linux Enterprise Server 12 试用体验
- SUSE Linux Enterprise 12 发布
- CDH 5.9 之 Kylin 安装 (SuSE Linux Enterprise 12 SP1)
- SUSE Linux Enterprise Desktop 10 (i586) ssh 设置