-
-
Save spladug/922144 to your computer and use it in GitHub Desktop.
The install script has moved to the main reddit repository: | |
https://github.com/reddit/reddit/blob/master/install-reddit.sh |
The package hangs out here. That should've automatically been sourced by our setup.py. Did that not work?
It was timing out for me before for that one file and giving me 404 errors when I tried to download from a browser. Seems to be working now.
Ran into this error when I tried to install on a fresh ubuntu:
paster run standalone r2/lib/js.py -c "build_reddit_js()"
Traceback (most recent call last):
File "/usr/local/bin/paster", line 9, in
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
File "/usr/local/lib/python2.6/dist-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 83, in run
command = commands[command_name].load()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/home/reddit/reddit/r2/r2/init.py", line 26, in
from r2.config.middleware import make_app
File "/home/reddit/reddit/r2/r2/config/init.py", line 22, in
from r2.lib.cache import sgm
File "/home/reddit/reddit/r2/r2/lib/cache.py", line 35, in
from r2.lib.utils import in_chunks, prefix_keys, trace
File "/home/reddit/reddit/r2/r2/lib/utils/init.py", line 22, in
from utils import *
File "/home/reddit/reddit/r2/r2/lib/utils/utils.py", line 36, in
from r2.lib.filters import _force_unicode
File "/home/reddit/reddit/r2/r2/lib/filters.py", line 29, in
from lxml.sax import saxify
ImportError: No module named lxml.sax
make: *** [r2/public/static/button.js] Error 1
had to manually install lxml for it to work, with
sudo apt-get install python-lxml
The newest version of pycountry 0.14 which is installed by default doesn't seem to work with this script, threw this error
File '/usr/local/lib/python2.6/dist-packages/pycountry-0.14-py2.6.egg/pycountry/init.py', line 16 in
class Countries(pycountry.db.Database):
AttributeError: 'module' object has no attribute 'db'
installing 0.12.1 fixed it
easy_install "pycountry==0.12.1"
For this to still work in (at least Ubuntu 10.10), you should change Cassandra's package name to include a previous version, since getting Reddit up in version 0.8 with the current configs wont work. "cassandra=0.7.2-0ubuntu4" would work.
pycountry has been updated and now works with the latest version
I ran into some problems using this on Ubuntu 11.04. I could be doing something wrong but I kept getting an error saying that aptitude was not a recognized command. I changed all of the references from aptitude to apt-get and it seems to have solved the problem. I just installed Ubuntu today to start playing with Reddit. I think the problem is that it doesn't come with aptitude installed (and it did in previous versions?).
See this gist for the modified version.
https://gist.github.com/1247021
aptitude isn't installed by default in 11.04. I BELIEVE it's something of an upgrade to apt-get, but I can't fully confirm that.
I figured it was something like that. I ran into a few more errors after I got passed that and I realized I was getting in a little over my head with this. I'm going to stick with simple PHP scripts for now.
Aptitude is not installed by default. I just did a fresh install of 11.04. But, you can easily install it by running:
apt-get update
apt-get install aptitude
I'm attempting to install on 11.1 (I removed the bit in the .sh that checks for version 11.04) and the install bails when it gets to the PPA:
You are about to add the following PPA to your system:
Packages for reddit
More info: https://launchpad.net/~jason-alioth/+archive/reddit
(everything is going fine until... )
Hit http://us.archive.ubuntu.com oneiric-backports/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com oneiric-backports/restricted TranslationIndex
Err http://ppa.launchpad.net oneiric/main Sources
404 Not Found
Err http://ppa.launchpad.net oneiric/main i386 Packages
404 Not Found
Hit http://us.archive.ubuntu.com oneiric-backports/universe TranslationIndex
Hit http://us.archive.ubuntu.com oneiric/main Translation-en
Hit http://us.archive.ubuntu.com oneiric/multiverse Translation-en
Hit http://us.archive.ubuntu.com oneiric/restricted Translation-en
Hit http://us.archive.ubuntu.com oneiric/universe Translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/main Translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/universe Translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/main Translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/universe Translation-en
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
root@ubuntu:/home/andrew/Downloads/gist922144-db8e2286a66ef18459cc356869df6d17e7b8f66a#
Any ideas on what's causing the script to bail?
Yup, none of the packages in the PPA are compiled for Oneiric. There's a reason that version check is there :P
Silly Me.
After reinstalling the correct version of Ubuntu, I'm bailing on the same error as Cheapsteak:
ImportError: No module named lxml.sax
make: *** [r2/public/static/button.js] Error 1
I've manually installed lxml with "sudo apt-get install python-lxml" but the script still dies at this line.
I've tried to follow the steps on Lucid (10.04.3 LTS) but it fails on
$ make pyx
Traceback (most recent call last):
File "r2/lib/js.py", line 8, in
from r2.lib.i18n import get_available_languages
ImportError: No module named r2.lib.i18n
Traceback (most recent call last):
File "r2/lib/js.py", line 8, in
from r2.lib.i18n import get_available_languages
ImportError: No module named r2.lib.i18n
cython r2/models/_builder.pyx
Error converting Pyrex file to C:
...
def _tree_filter(self, x):
return tree_sort_fn(x) < self.after._id
def _viewable_message(self, m):
if (c.user_is_admin
or getattr(m, "author_id", 0) == c.user._id
^
/home/reddit/reddit/r2/r2/models/_builder.pyx:282:22: Call with wrong number of arguments (expected 2, got 3)
You need a newer version of Cython.
Note: we don't support Lucid any more and there're parts of the code that will not work on Python 2.6.
The link to the reddit version of Paste (line 132) doesn't work anymore. Any other place to download it?