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)
...
${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)
PRETTY_NAME="CentOS Linux 7 (Core)"
CPE_NAME="cpe:/o:centos:centos:7"
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: