xHasKx / luamqtt

luamqtt - Pure-lua MQTT v3.1.1 and v5.0 client
https://xhaskx.github.io/luamqtt/
MIT License
154 stars 41 forks source link

mqtt.protocol4 is not installed with luarocks install #6

Closed danieldai closed 5 years ago

danieldai commented 5 years ago
daniel@memory:~/mqtt/luamqtt/examples (master)*$ lua simple.lua 
lua: /usr/local/share/lua/5.1/mqtt/init.lua:31: module 'mqtt.protocol4' not found:
    no field package.preload['mqtt.protocol4']
    no file './mqtt/protocol4.lua'
    no file '/usr/local/share/lua/5.1/mqtt/protocol4.lua'
    no file '/usr/local/share/lua/5.1/mqtt/protocol4/init.lua'
    no file '/usr/local/lib/lua/5.1/mqtt/protocol4.lua'
    no file '/usr/local/lib/lua/5.1/mqtt/protocol4/init.lua'
    no file '/usr/share/lua/5.1/mqtt/protocol4.lua'
    no file '/usr/share/lua/5.1/mqtt/protocol4/init.lua'
    no file './mqtt/protocol4.so'
    no file '/usr/local/lib/lua/5.1/mqtt/protocol4.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.1/mqtt/protocol4.so'
    no file '/usr/lib/lua/5.1/mqtt/protocol4.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file './mqtt.so'
    no file '/usr/local/lib/lua/5.1/mqtt.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.1/mqtt.so'
    no file '/usr/lib/lua/5.1/mqtt.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
    [C]: in function 'require'
    /usr/local/share/lua/5.1/mqtt/init.lua:31: in main chunk
    [C]: in function 'require'
    simple.lua:2: in main chunk
    [C]: ?
xHasKx commented 5 years ago

Hi danieldai,

Confirmed, will fix it soon

danieldai commented 5 years ago

I made a small PR to fix it: https://github.com/xHasKx/luamqtt/pull/7

xHasKx commented 5 years ago

Sorry, missed a PR. But there was another issue #4, which I also have to close so I made all changes myself

You may check installing version 1.4.3-3