I think you need to make sure the correct flags are used when running configure. For example, when we build protobuf on Mac, we need to set environment variables before configuring protobuf. For example:
$ CXXFLAGS="-m64" ./configure --disable-shared --prefix=$HOME/protobuf $ make clean && make && make install After that, when we run protoc, we use: $ export CXXFLAGS="-I$HOME/protobuf/include" \ LDFLAGS="$HOME/protobuf/lib/libprotobuf.a $HOME/protobuf/lib/libprotoc.a" If you run the `ldd` tool on protoc, you can see if it is properly linked. For example, you can see what mine shows: $ ldd protoc linux-vdso.so.1 (0x00007ffe013ab000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7e5fbd1000) libprotobuf.so.15 => /usr/local/lib/libprotobuf.so.15 (0x00007f7e5f755000) libprotoc.so.15 => /usr/local/lib/libprotoc.so.15 (0x00007f7e5f2c6000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7e5f0ac000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7e5ed2a000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7e5ea26000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7e5e80f000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7e5e470000) /lib64/ld-linux-x86-64.so.2 (0x00007f7e5fff2000) Here's the link to how we build protobuf: https://github.com/grpc/grpc-java/blob/master/RELEASING.md#mac On Wednesday, February 21, 2018 at 6:26:33 PM UTC-8, Yang Xia wrote: > > Hi, I want to install grpc. First, I need to install protobuf. Since I do > not have root permission ./configure > --prefix=/home/guo.1384/xiayang/protobuf. "/home/guo.1384/" is my home. > Then I “make install” . I checked /home/guo.1384/xiayang/protobuf/bin, it > shows: > > [guo.1384@head bin]$ ls -a > . .. protoc > I set up lib directory in LD_LIBRARY_PATH and bin dir in PATH. > I think something is wrong now. Then I want to build grpc. I use "make -j > 28 prefix=/home/guo.1384/xiayang/bin/grpc". > Then it shows: > protoc: error while loading shared libraries: libprotobuf.so.9: cannot > open shared object file: No such file or directory > > Could you please help me a little bit? > Thanks a lot! > -- 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 grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. 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/143381b7-efc0-46bc-babc-e083edd6c196%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.