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"
HOME_URL="https://www.centos.org/"
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.zipcd protobuf-3.3.0
./configure
make
make check
sudo make install
sudo ldconfigcd -
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpccd
grpc
git submodule update --init
sudo ldconfig
make
sudo make installcd -
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/a782baa4-fda6-4ec8-a8d1-6b1e0c7019ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.