freeswitch在linux平台添加mqtt(编译并添加mod_Mosquitto)

#首先进入目录并下载编译

cd src/mod/applications/

git clone http://hub.fgit.gq/freeswitch/mod_mosquitto.git

cd   mod_mosquitto

./bootstrap.sh -j 

./configure CFLAGS=-Wno-error

报错

checking for FREESWITCH... no

configure: error: Package requirements (freeswitch) were not met:

Package 'freeswitch', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables FREESWITCH_CFLAGS

and FREESWITCH_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

发现是找不到freeswitch的pc文件 查找一下本地的freeswitch的Package ,添加路径,重新执行

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/freeswitch/lib/pkgconfig/:${PKG_CONFIG_PATH}

./bootstrap.sh -j 

./configure CFLAGS=-Wno-error

报错 

checking for MOSQUITTO... no

no

checking that generated files are newer than configure... done

configure: creating ./config.status

config.status: creating Makefile

config.status: executing depfiles commands

config.status: error: in `/mnt/d/work/freeswitch_projects/src/mod/applications/mod_mosquitto':

config.status: error: Something went wrong bootstrapping makefile fragments

    for automatic dependency tracking.  If GNU make was not used, consider

    re-running the configure script with MAKE="gmake" (or whatever is

    necessary).  You can also try re-running configure with the

    '--disable-dependency-tracking' option to at least be able to build

    the package (albeit without support for automatic dependency tracking).

发现需要安装MOSQUITTO 我直接从软件源安装了一个也可以去github下一个编译安装 eclipse/mosquitto: Eclipse Mosquitto - An open source MQTT broker (github.com)

再次运行通过 

./bootstrap.sh -j 

./configure CFLAGS=-Wno-error

make

sudo make install


©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容