This tutorial comes from protocol buffers
Protobuf is installed on my userspace. Similar to Apache Thrift, you need to specify enviornment variables at compile and run time.
- Protobuf binary
export PATH=/home/phao3/protobuf/bin/bin:$PATH
- Protobuf Package configuration file location
export PKG_CONFIG_PATH=/home/phao3/protobuf/bin/lib/pkgconfig
You need to set LD_LIBRARY_PATH for runtime dynamic link.
export LD_LIBRARY_PATH=/home/phao3/protobuf/bin/lib
You need to set CLASSPATH for runtime class discovery
export CLASSPATH=/home/phao3/protobuf/protobuf-3.4.0/java/core/target/protobuf.jar
You need to set sys.path within the code
import sys
sys.path.append('/home/phao3/protobuf/protobuf-3.4.0/python')