2015-07-19 107 views
-1

的問題出現了,當我試圖啓動一個項目的Django CMS使用以下命令:錯誤在Ubuntu 14.04開始的Django CMS項目LTS

djangocms -p . mysite 

這是錯誤:

Database configuration (in URL format) [default sqlite://localhost/project.db]: 
django CMS version (choices: 2.4, 3.0, 3.1, stable, develop) [default stable]: 
Django version (choices: 1.4, 1.5, 1.6, 1.7, 1.8, stable) [default stable]: 
Activate Django I18N/L10N setting (choices: yes, no) [default yes]: 
Install and configure reversion support (choices: yes, no) [default yes]: 
Languages to enable. Option can be provided multiple times, or as a comma separated list. Only language codes supported by Django can be used here: en 
Optional default time zone [default Europe/Madrid]: 
Activate Django timezone support (choices: yes, no) [default yes]: 
Activate CMS permission management (choices: yes, no) [default yes]: 
Use Twitter Bootstrap Theme (choices: yes, no) [default no]: 
Use custom template set [default no]: 
Load a starting page with examples after installation (english language only). Choose "no" if you use a custom template set. (choices: yes, no) [default no]: 
Creating the project 
Please wait while I install dependencies 
Dependencies installed 
Creating the projectFailure occurred. Do you want to cleanup by removing /home/alberto/Documentos/PouBlog? [Y/N] 
Traceback (most recent call last): 
    File "/home/alberto/.virtualenvs/PouBlog/bin/djangocms", line 11, in <module> 
    sys.exit(execute()) 
    File "/home/alberto/.virtualenvs/PouBlog/local/lib/python2.7/site-packages/djangocms_installer/main.py", line 53, in execute 
    install.cleanup_directory(config_data) 
    File "/home/alberto/.virtualenvs/PouBlog/local/lib/python2.7/site-packages/djangocms_installer/install/__init__.py", line 92, in cleanup_directory 
    if strtobool(choice) or config_data.noinput: 
    File "/usr/lib/python2.7/distutils/util.py", line 325, in strtobool 
    raise ValueError, "invalid truth value %r" % (val,) 
ValueError: invalid truth value '' 

回答

1

無效的真相值「發生,因爲在最後一個問題中沒有選擇通過

Creating the projectFailure occurred. Do you want to cleanup by removing /home/alberto/Documentos/PouBlog? [Y/N] 

在我的情況下,問題是與PIL天秤座RY其中未建立使用JPEG支撐,其可使用以下步驟來確定:

安裝相關的庫:

sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev 
sudo apt-get install libjpeg8-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk 
sudo apt-get install libqd-dev 
sudo apt-get install libmysqlclient-dev 

重新安裝PIL和CMS:

pip install -U --force Pillow 
pip install --upgrade --force-reinstall --no-deps djangocms-installer 

如果上述不工作,以修復PIL請嘗試以下,以建立正確PIL庫:

$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/ 
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/ 
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/ 

獲取成像/ PIL庫:

wget http://effbot.org/media/downloads/Imaging-1.1.6.tar.gz 

提取成像焦油和修改成像-1.1.6/_imagingft.c:

tar -zxvf Imaging-1.1.6.tar.gz; cd Imaging-1.1.6; 
python setup.py build 
Error observed: 
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include -I/usr/local/include -I/usr/include/python2.7 -c _imagingft.c -o build/temp.linux-x86_64-2.7/_imagingft.o 

_imagingft.c:68:31:致命錯誤:freetype的/ fterrors。 H:沒有這樣的文件或目錄 的#include 上述行更改爲: 的#include

Retar並安裝

tar -zcvf Imaging-1.1.6.tar.gz Imaging-1.1.6 
pip install -U --force Imaging-1.1.6.tar.gz 

現在再次遵循djangocms步驟。

希望它有幫助。

0

在我的情況下,問題是當CMS安裝程序問我用','分隔的語言回答的語言。 當我再次嘗試並且僅用','分隔語言時,它工作正常。