Since the official ShareLaTeX documentation is primarily written with Ubuntu 12.04 LTS in mind, I tried to re-build the provided .deb from scratch using Ubuntu 14.04 TLS with the least amount of non-standard or non-packaged software.
Here are all the steps that were required (with sudo since Ubuntu doesn't want you to be root
).
First, install lots of packages - note that no additional repositories are required! (Dependencies):
$ sudo apt-get update
$ sudo apt-get install git build-essential curl python-software-properties zlib1g-dev zip unzip
$ sudo apt-get install ruby-dev
$ sudo apt-get install nodejs npm
$ sudo apt-get install redis-server
$ sudo apt-get install mongodb
$ sudo apt-get install aspell
$ sudo apt-get install texlive latexmk
To satisfy grunt
, we need to have an executable called node
:
$ sudo ln -s `which nodejs` /usr/local/bin/node
Additionally, we need some packages through external package managers:
$ sudo npm install -g grunt-cli
$ sudo gem install fpm
Now there might be a ~/tmp
directory owned by root. We need to remove that so we can continue as a normal user:
$ sudo rmdir ~/tmp
Now we can clone the repository and install all additional dependencies (Setting up a Development Environment, make sure to check out the release
branch, as per #comment-1346019):
$ git clone -b release https://github.com/sharelatex/sharelatex.git
$ cd sharelatex
$ npm install
Now we can install the actual ShareLaTeX services:
$ grunt install
After that is done, we can run the provided sanity check:
$ grunt check --force
[...]
Running "check:latexmk" task
Checking latexmk is installed... >> FAIL.
>> latexmk version is too old (4.35). Must be 4.39 or greater.
>> This is a not a fatal error, but compiling will not work without latexmk
Warning: latexmk is too old Use --force to continue.
[...]
In my case, it complained about latexmk being too old, but I ignored that for now, compiling simple LaTeX documents seemed to work anyway.
Now you need to apply the patch below to change one of the dpkg dependencies since the package in the official Ubuntu repositories is called just mongodb
instead of mongodb-org
:
$ wget https://gist.githubusercontent.com/moschlar/2b941f75a44fbac69993/raw/mongodb-dep.patch
$ patch -p1 < mongodb-dep.patch
After that, we create a huge .deb package:
$ grunt build:deb
Then it should be sufficient to run
$ dpkg -i sharelatex_0.0.1_amd64.deb
(Installing on Ubuntu 12.04 from dpkg (.deb)) and your ShareLaTeX should be running on http://localhost:3000.
And finally, as you might guess, if you want to use Nginx as a Reverse Proxy, you don't need no external repository, the packaged version in the Ubuntu repository is recent enough:
$ sudo apt-get install nginx
God bless you! 😃
Finally sharelatex is running on my VM....however when I try to sync the account with dropbox in the account properties this error pops up:
Oops, something went wrong with your request, sorry. If this continues, please contact us at [email protected]
Is this error related to the sharelatex opensource installation or somethig else?
Thank you once again!