Run example
robooo opened this issue · comments
Just wanted to run example, but end with this error:
luajit examples/readpcap
luajit: ./ndpi/c.lua:73: dlopen(libndpi.dylib, 5): image not found
stack traceback:
[C]: in function 'load'
./ndpi/c.lua:73: in main chunk
[C]: in function 'require'
./ndpi/wrap.lua:9: in main chunk
[C]: at 0x01084b4ba0
[C]: in function 'require'
examples/readpcap:16: in main chunk
[C]: at 0x010849767a
Please help
brew install ndpi
fixed it, but now I get:
luajit examples/readpcap
Segmentation fault: 11
Sorry I forget mention I'm on OSX
Looks like it works but is it useable? because I get no print.
I tried print(input:packets())
and get:
luajit examples/readpcap.lua
function: builtin#36
Timestamp (1430839705757ULL): bug in pcap file, repairing
Timestamp (1430839705792ULL): bug in pcap file, repairing
Timestamp (1430839705809ULL): bug in pcap file, repairing
Timestamp (1430839706304ULL): bug in pcap file, repairing
Timestamp (1571302316805ULL): bug in pcap file, repairing
Timestamp (1571302317624ULL): bug in pcap file, repairing
Timestamp (1571302317624ULL): bug in pcap file, repairing
Timestamp (1571302317624ULL): bug in pcap file, repairing....
@robooo Which version of nDPI is brew
installing for you? Note that only versions 1.7 and 1.8 are tested and supported.
If yours is one of the versions, it could be because the code tries to use some symbol from the library which is not built under Mac OS X. I do not have easy access to a Mac, so this is going to be a bit difficult to figure out. Given that you have Brew, that means you should have the developers tools installed. Could you provide the output from nm -D path/to/libndpi.dylib
? (it may be long, so please post it attached, or as a Gist.)
I have ndpi-1.8, and I'm sorry but I can't locate any libndpi.dylib file
Found I have two which is not good I think
locate libndpi.dylib
/usr/local/Cellar/ndpi/1.8/lib/libndpi.dylib
/usr/local/lib/libndpi.dylib
first:
first.txt
second:
second.txt
@robooo: It seems that both libraries are exactly the same. Probably brew
is hardlinking the same data at both locations. Anyway, I checked the symbol list that you sent (thanks!), but all the symbols needed by ljndpi are defined in your libndpi.dylib
. At this point I guess the only way to find out the solution is getting access to a Mac — I'll try to figure out something.