1

Already referred below old posts, but its solution of installing websockets didn't work in my Ubuntu 21.10.

This could be probably due to my Qt is 6.2, while the available library is from Qt5, viz. libqt5websockets5-dev.

How to install websocket module properly for the Qt6, to fix below error?

Project ERROR: Unknown module(s) in QT: websockets

iammilind
  • 68,093
  • 33
  • 169
  • 336
  • How did you install Qt 6.2? – Alan Birtles Feb 10 '22 at 12:38
  • This page says websockets was removed from 6.0: [https://doc-snapshots.qt.io/qt6-dev/whatsnew60.html#removed-modules-in-qt-6-0](https://doc-snapshots.qt.io/qt6-dev/whatsnew60.html#removed-modules-in-qt-6-0) however its supposed to be back at 6.2: [https://doc-snapshots.qt.io/qt6-dev/whatsnew62.html](https://doc-snapshots.qt.io/qt6-dev/whatsnew62.html) – drescherjm Feb 10 '22 at 12:38
  • @AlanBirtles, I installed from the Qt's online installer. It was not custom installation, but whatever default 6.2 being given. May be I missed the additional libraries as suggested in the below answer. Will give it a try. – iammilind Feb 11 '22 at 02:44
  • @drescherjm, any idea, why did they intend to even remove the `websockets' library. Many people should have bem using it for various purpose. Don't they find it useful Or is it buggy? – iammilind Feb 11 '22 at 02:45
  • You'd have to ask the developers but at a guess I'd imagine it simply wasn't ready for the 6.0 release – Alan Birtles Feb 11 '22 at 08:00

1 Answers1

5

When installing Qt via Qt Maintenance Tool, just go to Additional Libraries and check QtWebSockets. It is available in Qt 6.2.x versions.

enter image description here