栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

编译hue报错

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

编译hue报错

creating dist
creating ‘dist/configobj-4.7.2-py2.6.egg’ and adding ‘build/bdist.linux-x86_64/egg’ to it
removing ‘build/bdist.linux-x86_64/egg’ (and everything under it)
— Building egg for cryptography-1.3.1
Couldn’t find index page for ‘cffi’ (maybe misspelled?)
No local packages or download links found for cffi>=1.4.1
Traceback (most recent call last):

raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse(‘cffi>=1.4.1’)
make[2]: *** [/export/servers/hue-4.2.0/desktop/core/build/cryptography-1.3.1/egg.stamp] Error 1
make[2]: Leaving directory /export/servers/hue-4.2.0/desktop/core' make[1]: *** [.recursive-env-install/core] Error 2 make[1]: Leaving directory /export/servers/hue-4.2.0/desktop’
make: *** [desktop] Error 2

可能是python版本冲突了,解决办法,本地的版本只是python2.6.6
pyhton2.6默认是没有pip的,所以编译的时候下载那个什么玩意就下载不下来,
自己手动pip install ,用的其实是3.7版本的python的pip,但是hue编译就是不识别
后面不知道怎么下载到了python2.6的pip
好像是这么下载的yum install python-pip,然后会在user/bin/下面多个pip
但是用pip -v还是显示别的版本的pip,路径也不对
后面用指定用usr/bin/pip install cffi,也还是不行,会报错
报错大概是2.6版本pip不支持下载啥啥的.最后指定数据源成功,用下面的

usr/bin/pip --trusted-host pypi.doubanio.com install cffi -i http://pypi.doubanio.com/simple

hue后台启动报错

UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-11: ordinal not in range(128)

解决办法
进入你python的目录,例如我的是

cd /usr/lib/python2.6/site-packages
创建这个文件
vim sitecustomize.py
加入下面内容
import sys  
reload(sys)  
sys.setdefaultencoding('utf8')  
保存退出

完美解决,撒花,附上hue后台启动命令

nohup /export/servers/hue-4.2.0/build/env/bin/supervisor &

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/972708.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号