E: VH default: iface ▒V▒▒ port 0 DOESN'T EXIST / E: lws_plat_drop_app_privileges: getpwuid: unable to find uid 8080
cpp code:
// 配置服务器信息
struct lws_context_creation_info info;
memset(&info, 0, sizeof(info));
info.port = m_port;
info.protocols = m_protocols;
info.gid = -1;
info.uid = -1;
info.options |= LWS_SERVER_OPTION_DISABLE_IPV6; // 禁用IPv6
// info.iface = "enp2s0";
info.iface = NULL;
but when build it, then run it with problems :
[2025/08/20 18:32:35:6748] E: VH default: iface ▒V▒▒ port 0 DOESN'T EXIST
[2025/08/20 18:32:35:6757] E: lws_plat_drop_app_privileges: getpwuid: unable to find uid 8080
问题来源:
安装的版本websockets与使用的有问题
解决方法:
卸载websockets 使用 sudo apt-get install libwebsocket-dev安装。
完全删除后,使用源码编译安装,再重新编译自己的测试程序。
https://github.com/warmcat/libwebsockets/issues/3446

浙公网安备 33010602011771号