問題タブ [libwebsockets]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
1367 参照

linux - mosquitto MQTT 用の AWS Linux での libwebsockets ライブラリのインストール/リンク

AWS ガイド: https://aws.amazon.com/blogs/iot/how-to-bridge-mosquitto-mqtt-broker-to-aws-iot/に従って、 mosquitto をインストールする手順に進みました。

//Update the list of repositories with one containing Mosquitto sudo wget http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/home:oojah:mqtt.repo -O /etc/yum.repos.d/mqtt.repo //Install Mosquitto broker and Mosquitto command line tools sudo yum install mosquitto mosquitto-clients

ただし、このガイドは非常に古いため、欠落している libwebsockets ライブラリについては何も言及されていません。ライブラリを手動でインストール/リンク/セットアップする方法についての回答を探すのに約4〜5時間を費やしましたが、何も機能させることができませんでした.

(1) やってみた
git clone https://github.com/warmcat/libwebsockets.git cd libwebsockets mkdir build cd build cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc make sudo make install

しかし、CMAKEは次のようなあらゆる種類のエラーをスローするため、うまくいきませんでした

CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:99 (message): Could not find toolchain file: /tmp/mytoolchainfile Call Stack (most recent call first): CMakeLists.txt:131 (project) CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR CMake Error: Could not find cmake module file: /tmp/libwebsockets/build/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake -- Configuring incomplete, errors occurred!

そこで、CMAKE_C_COMPILER パスを /usr/bin/gcc に設定しようとしました。これは、コンパイラがインストールされている場所であり、何もしませんでした。正直なところ、私は Linux にあまり詳しくありません。できる限りのことをしようとしているだけです。ライブラリをインストールしてLinuxにリンクするための最良の方法について、いくつかのガイダンスを実際に使用できます。AWS はレッドハット バージョンの Linux を実行していると思います。

御時間ありがとうございます!