grpc编译错误解决

berli@berli-VirtualBox:~/grpc$ make
[MAKE]    Generating cache.mk
[C]       Compiling src/core/lib/security/credentials/jwt/jwt_verifier.c
src/core/lib/security/credentials/jwt/jwt_verifier.c: In function ‘pkey_from_jwk’:
src/core/lib/security/credentials/jwt/jwt_verifier.c:498:10: error: dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’
       rsa->n =
          ^
Makefile:2526: recipe for target '/home/berli/grpc/objs/opt/src/core/lib/security/credentials/jwt/jwt_verifier.o' failed

make: *** [/home/berli/grpc/objs/opt/src/core/lib/security/credentials/jwt/jwt_verifier.o] Error 1


那么用下面的命令编译就可以了,前提是你已经安全了openssl 1.0.0或其他1.0.2之前的版本

PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig make

如果在link时错误

可以再make就可以了

berli@berli-VirtualBox:~/grpc$ make
[MAKE]    Generating cache.mk
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc.so.4.0.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc_cronet.so.4.0.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc_unsecure.so.4.0.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc++.so.1.5.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc++_cronet.so.1.5.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc++_error_details.so.1.5.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc++_reflection.so.1.5.0-dev
[LD]      Linking /home/berli/grpc/libs/opt/libgrpc++_unsecure.so.1.5.0-dev

转载于:https://www.cnblogs.com/mtcnn/p/9410031.html

你可能感兴趣的:(grpc编译错误解决)