Skip to content

Installation

Ashish Ahuja edited this page Jun 3, 2016 · 14 revisions

This bot is dependent on the OS you're running on, and uses Linux specific libraries. So if you're in any other OS than Linux and Mac, it's unlikely that the bot will run.

#Linux

To run this program, you need to either have gcc or clang installed. If you have them installed you can skip to the next part. If you do not have them installed, here's what you have to do if you're on Ubuntu/Debian:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-<version>

Just run the above commands, and put the version you want to be installed in place of <version>.

For installing gcc on OpenSuse, do:

sudo zypper install gcc

Now to the next step. This program uses libwebsockets, and libCURl, which is normally not installed in a linux computer. To install them, do:

apt-get install libcurl-dev

This will show you some versions of libCURL you can install. Choose one of them, and continue.

To install libwebsockets, do:

apt-get install libwebsockets-dev

After you've installed all this, you can compile the bot. So simply run the makefile or do:

gcc chatbot/*.c -lcurl -lwebsockets -lpthread -lm -o firealarm

Note that you shouldn't be any more C files in the folder you've kept the chatbot, other than the files in the repo. If there are, you should take all the chatbot's files to another folder, or replace *.c with the names of the files.

If it compiles successfully, run the executable (.out file).

Clone this wiki locally