我正按照以下手册中的说明设置Raspberry Pi 3 B +并将其连接到Azure上的IoT中心:
https://azure.microsoft.com/en-us/resources/samples/iot-hub-c-raspberrypi-getstartedkit/
尝试在步骤1.6中构建更新的示例解决方案后,Raspberry Pi的终端会显示此信息(因为构建无法完成):
[ 59%] Building C object azure-iot-sdks/c/azure-c-shared-utility/CMakeFiles/aziotsharedutil.dir/src/x509_openssl.c.o
/home/pi/iot-hub-c-raspberrypi-getstartedkit/azure-iot-sdks/c/azure-c-shared-utility/src/tlsio_openssl.c: In function ‘create_openssl_instance’:
/home/pi/iot-hub-c-raspberrypi-getstartedkit/azure-iot-sdks/c/azure-c-shared-utility/src/tlsio_openssl.c:713:5: error: ‘TLSv1_method’ is deprecated [-Werror=deprecated-declarations]
tlsInstance->ssl_context = SSL_CTX_new(TLSv1_method());
^~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from /home/pi/iot-hub-c-raspberrypi-getstartedkit/azure-iot-sdks/c/azure-c-shared-utility/src/tlsio_openssl.c:9:
/usr/include/openssl/ssl.h:1612:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /*
TLSv1.0 */
^
cc1: all warnings being treated as errors
azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/build.make:950: recipe for target 'azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/src/tlsio_openssl.c.o' failed
make[2]: *** [azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/src/tlsio_openssl.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 60%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_registrymanager.c.o
[ 61%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_messaging_ll.c.o
CMakeFiles/Makefile2:1042: recipe for target 'azure-iot-sdks/c/azure-
c-shared-utility/CMakeFiles/aziotsharedutil.dir/all' failed
make[1]: *** [azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 62%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_service_client_auth.c.o
[ 62%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/__/iothub_client/src/iothub_message.c.o
[ 63%] Linking C static library libiothub_service_client.a
[ 63%] Built target iothub_service_client
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
我无法通过此错误。任何帮助将不胜感激。感谢。