当我尝试使用以下命令启动项目Django CMS时出现问题:
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 ''
答案 0 :(得分:1)
由于在最后一个问题中没有选择
,因此发生了无效真值''Creating the projectFailure occurred. Do you want to cleanup by removing /home/alberto/Documentos/PouBlog? [Y/N]
在我的情况下问题是PIL库,它不是使用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/
获取Imaging / 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
重新定位并安装
tar -zcvf Imaging-1.1.6.tar.gz Imaging-1.1.6
pip install -U --force Imaging-1.1.6.tar.gz
现在再次按照djangocms步骤操作。
希望它有所帮助。
答案 1 :(得分:0)
在我的情况下,问题是当CMS安装程序问我用“,”分隔的语言时我回答的语言。 当我再次尝试并将语言仅用','分开时,它才能正常工作。