PROTOBUF learning------ubuntu14.04 under protobuf2.6 installation

Source: Internet
Author: User

1 Downloads Protobuf

Https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz

2 Enter the directory of the downloaded file

1 tar -zxvf protobuf-2.6. 1. Tar . GZ 2 cd protobuf-2.6. 1/3 ./Configure4make5 make check  6makeinstall

I have the following problems when I execute the./configure

Solutions

sudo Install build-essential

3 Check if the installation is successful

Protoc--version

If the installation succeeds, the version number will appear as

2.6. 1

If there is a problem, the error content will be output

Finally, I completed the installation, with the above command to check the version number when the following problem occurs

Protoc:error while loading shared libraries:libprotocbuf.so.9:cannot open shared

Cause of error

The default installation path for PROTOBUF is/usr/local/lib, and/usr/local/lib is not in the default Ld_library_path of the Ubuntu system, so Lib is not found

Solutions

1 Create the file bprotobuf.conf file in the/etc/ld.so.conf.d/directory, the file content is as follows

/usr/local/lib

2 input commands

sudo ldconfig

Then, enter Protoc--version to see the version number as normal.

For more information about/etc/ld.so.conf.d/, please refer to the following article for instructions

http://blog.csdn.net/apn172/article/details/8868968

http://blog.csdn.net/yjkwf/article/details/7545002

PROTOBUF learning------ubuntu14.04 under protobuf2.6 installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.