minimal mapboxgl application does not show map
-
Hi there
I want to use mapboxgl plugin in my educational app and just for testing how it works, I have created a Qt Quick application in the QtCreator using Qt 5.15. The main qml file is as below:
import QtQuick 2.15 import QtQuick.Window 2.15 import QtLocation 5.15 import QtPositioning 5.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Map { id: map anchors.fill: parent plugin: Plugin { name: "mapboxgl" PluginParameter { name: "mapboxgl.mapping.items.insert_before" value: "road-label-small" } PluginParameter { name: "mapboxgl.access_token" value: "pk.eyJ1IjoiYW1pci1yZXphLXNhZGVnaGkiLCJhIjoiY2xhM3J5Nm5uMHQyYzN0bXp4eWxkamdsayJ9.0s-SuB1jKl5RAuRMox88Mg" } } } }
When I run this code, the application window opens but nothing appears on it. in the output terminal, below messages are printed:
Threaded rendering is not optimal in the Mapbox GL plugin. qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate [ ERROR ] "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed" qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate [ ERROR ] "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed" qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate [ ERROR ] "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed" qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate [ ERROR ] "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed" qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate [ ERROR ] "{QSGRenderThread}[Setup]: loading style failed: SSL handshake failed"
I use Ubuntu 22.04 lts and also installed openssl using:
sudo apt-get install openssl
but it did not help me.
Does anyone know how to solve this problem?
Thanks for your helps
sincerely
Amir Reza Sadeghi -
The reason is that openssl is not installed in your system. Go to https://github.com/openssl/openssl and follow download and build instructions. After installation add this line to your .pro file.
LIBS += -L{path_of_installation} -llibssl.so
LIBS += -L{path_of_installation} -llibcrypto.soIn unix and similar systems, the install path will be as follows by default
--> /usr/local
so if you are using linux and installed openssl by default settings, add this lines to your .pro file
LIBS += -L/usr/local/lib/ -llibssl.so
LIBS += -L/usr/local/lib/ -llibcrypto.so -
The reason is that openssl is not installed in your system. Go to https://github.com/openssl/openssl and follow download and build instructions. After installation add this line to your .pro file.
LIBS += -L{path_of_installation} -llibssl.so
LIBS += -L{path_of_installation} -llibcrypto.soIn unix and similar systems, the install path will be as follows by default
--> /usr/local
so if you are using linux and installed openssl by default settings, add this lines to your .pro file
LIBS += -L/usr/local/lib/ -llibssl.so
LIBS += -L/usr/local/lib/ -llibcrypto.so@berkayozkarhan Edit : you can also install OpenSSL by MaintenanceTool.
-
@berkayozkarhan Edit : you can also install OpenSSL by MaintenanceTool.
@berkayozkarhan I installed it, but the error is still reported.
-
You can ignore ssl errors and go ahead