我正在尝试将 reddit 源代码安装到 ubuntu 12.04.5 上。我正试图从 github 指南安装 python 模块依赖项:
$ cd reddit/r2
$ python setup.py build
$ sudo python setup.py develop
$ make
但是当我python setup.py build
在终端输入时,收到以下内容:
Cannot find Baseplate. Skipping Thrift build.
running build
running build_py
running build_ext
最初我也收到了,Cannot find Cython. Skipping Cython build.
但我能够通过一个简单的方法修复它sudo apt-get install cython.
,但是当我尝试时sudo apt-get install baseplate
终端告诉我E: Unable to locate package baseplate
。
我也试过了,sudo apt-get install python-gevent python-baseplate
但还是没成功。我已经试过了,sudo apt-get upgrade
但sudo apt-get update.
还是没用。请帮忙。
答案1
开始之前,请删除现有目录并重新开始。
首先,您需要安装 ppa:
sudo add-apt-repository ppa:reddit/ppa
sudo apt-get update
接下来安装一些依赖项:
sudo apt-get install postgresql cassandra memcached rabbitmq-server haproxy stunnel python-setuptools python-dev libmemcached-dev libpq-dev libxml2-dev libxslt1-dev python-imaging git-core gcc optipng jpegoptim postgresql-client make gettext nodejs node-less node-uglify
现在,克隆 git 仓库:
git clone https://github.com/reddit/reddit.git
安装python模块依赖项:
cd reddit/r2
python setup.py build
sudo python setup.py develop
make