Getting error on Centos7: libgrpc++.so.1: cannot open shared object file

1,031 views
Skip to first unread message

rkabh...@gmail.com

unread,
Nov 3, 2017, 7:15:16 PM11/3/17
to grpc.io
Seeing the below error when trying to run my C++11 application on Centos 7. Any ideas how I can fix this?

$ ./gnmi_server 
./gnmi_server: error while loading shared libraries: libgrpc++.so.1: cannot open shared object file: No such file or directory

This is how I am linking to these libraries in my CMakeLists.txt file:

find_package(Protobuf REQUIRED)
find_package(GRPC REQUIRED)
 ...
 include_directories(
    ${Protobuf_INCLUDE_DIR}
)
 ...
add_executable(gnmi_server "gnmi_server.cpp" ${libgnmi_sources})
target_link_libraries(gnmi_server ${PROTOBUF_LIBRARY} ${GRPC_GRPC++_LIBRARY})

System information:

[root@localhost build]# cat /etc/*release
CentOS Linux release 7.2.1511 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.2.1511 (Core) 
CentOS Linux release 7.2.1511 (Core) 

Installed gRPC and protobuf libraries with the below commands:

wget https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.zip
unzip protobuf-cpp-3.3.0.zip
cd protobuf-3.3.0
./configure
make
make check
sudo make install
sudo ldconfig
cd -
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
sudo ldconfig
make
sudo make install
cd -

Nicolas Noble

unread,
Nov 28, 2017, 7:16:30 PM11/28/17
to grpc.io
The latest version of gRPC should really no longer be .1 due to API/ABI changes. Are you by any chance trying to run an older binary while hoping to run against a newer version of the library ? Can you check the filename that gets installed during the make install step of gRPC ?
Reply all
Reply to author
Forward
0 new messages