plugins - 加载 plugin.so 错误:未定义符号“mosquitto_client_username”
问题描述
为什么我的插件通过编译,但无法从 conf 文件加载?
mosquitto -c mosquitto.conf
1612271905: mosquitto version 2.0.5 starting
1612271905: Config loaded from mosquitto.conf.
1612271905: Loading plugin: /usr/home/bluse/mosquitto-pg-auth-plug/auth-plugin.so
1612271905: Error: Unable to load auth plugin "/usr/home/bluse/mosquitto-pg-auth-plug/auth-plugin.so".
1612271905: Load error: /usr/home/bluse/mosquitto-pg-auth-plug/auth-plugin.so: Undefined symbol "mosquitto_client_username"
编译命令是:
cc -I/usr/local/include -I`pg_config --includedir` -L/usr/local/lib -L`pg_config --libdir` -lpq -fPIC -shared auth_plugin.c -o auth-plugin.so
我错过了什么吗?帮助!
解决方案
使用 mosquitto 修复分支,或使用 v2.0.7 版本
推荐阅读
- java - Java 13 对 Eclipse 的支持
- asp.net - 浏览器后退按钮在 asp.net 上丢失会话
- python - 使用布尔数组的 Numpy 索引
- java - 我是否应该删除继承类中未使用可空值注释的覆盖方法的可空性
- c++ - 如何使 ROS 发布/订阅单元测试具有确定性?
- css - 使用 CSS 转换延迟和 CSS 过滤器的 Safari 错误
- pyspark - 从数组 pyspark 中删除数组列
- angular - Angular 8 @ViewChild 返回未定义。无法访问 ElementRef
- python - 获取多行字符串的索引
- excel - 如何计算每小时范围内的电子邮件?