Updated Installing on Linux (markdown)

Twentysix
2016-01-20 18:10:31 +01:00
parent 1dfd8fa8f0
commit 5eeabf98cc

@@ -1,28 +1,75 @@
# Installation on Linux # Installation on Linux
For Linux, the procedure is mostly the same as Windows. Install [these requirements first]
(https://github.com/Twentysix26/Red-DiscordBot/wiki/Requirements).
You need some more if you're installing it on Linux though. Freedom doesn't come without a cost. Namely, ffmpeg and opus.
##Compiling ffmpeg with openssl support A general guide, tested on Ubuntu 15.10 and Raspberry Pi (original)
This is very important. You must specify openssl support when you compile it. ###Updates first
You can follow [this article](http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html) (Ubuntu) or [this article](http://www.jeffreythompson.org/blog/2014/11/13/installing-ffmpeg-for-raspberry-pi/) (Raspberry Pi) but when you have to configure remember to add the `--enable-openssl` parameter. Like this:
###Ubuntu:
`./configure --enable-nonfree --enable-gpl --enable-libx264 --enable-x11grab --enable-zlib --enable-openssl`
###Raspberry Pi: `sudo apt-get update`
`sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-openssl`
##Opus ###Installing Python 3.5.1
```
sudo apt-get install libssl-dev openssl
sudo mkdir pythonbuild
cd pythonbuild/
sudo wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
sudo tar xvfz Python-3.5.1.tgz
cd Python-3.5.1/
sudo ./configure
sudo make
sudo make install
```
On some distributions Opus is already installed, so you should check first. Installing it on Ubuntu is simple: ###Installing Git
`sudo apt-get install git`
###Requirements
```
sudo pip3.5 install git+https://github.com/Rapptz/discord.py@async
sudo pip3.5 install requests
sudo pip3.5 install youtube_dl
sudo pip3.5 install beautifulsoup4
```
###FFmpeg rerquired for openssl
`sudo apt-get install libxext-dev`
###FFmpeg Ubuntu
```
sudo apt-get install git make nasm pkg-config libx264-dev libxext-dev libxfixes-dev zlib1g-dev
sudo git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
sudo ./configure --enable-nonfree --enable-gpl --enable-libx264 --enable-x11grab --enable-zlib --enable-openssl
```
###FFmpeg Raspberry Pi
```
cd /usr/src
git clone git://git.videolan.org/x264
cd x264
sudo ./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-openc
sudo make
sudo makeinstall
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-openssl
sudo make
sudo make install
```
###Install Libopus0
`sudo apt-get install libopus0` `sudo apt-get install libopus0`
And now, assuming everything went smooth, you're done. You can keep following the [Windows guides](https://github.com/Twentysix26/Red-DiscordBot/wiki#windows) to install Red herself, as the procedure is pretty much the same. The worst part is over. ###Red
```
cd Desktop/
git clone https://github.com/Twentysix26/Red-DiscordBot.git
cd
clear
```
*** ###Running Red
####Having issues? ```
Some Linux users reported this issue: two different python versions installed together, with the older one being the default. It would probably be wiser to wipe completely the old one and install the requirements again, however some have resolved by copying the requirements from the old one directly to the newer: cd Desktop/Red-DiscordBot/
`/usr/local/lib/python3.4/dist-packages` -> `/usr/local/lib/python3.5/dist-packages` sudo python3 red.py
Probably not the most delicate way to deal with it but hey, it works. ```