当我尝试通过 yum 安装 odoo 时出现以下错误。
已完成依赖关系解决 软件包:odoo-8.0_20150617-1.noarch (odoo-nightly) 需要:python(abi) = 2.7 已安装:python-2.6.6-52.el6.x86_64 (@base) python(abi) = 2.6 可用:python-2.6.6-51.el6.x86_64 (test) python(abi) = 2.6 您可以尝试使用 --skip-broken 来解决这个问题 您可以尝试运行:rpm -Va --nofiles --nodigest
我遵循了下面提到的步骤。
- 安装了 pstgresql 9.4.4
- 将 Python 2.6 更新至 2.7
- 配置 odoo 存储库
- 尝试使用 yum install odoo 安装 odoo
我也更新了 python。
python --version
Python 2.7.6
有人能帮我解决这个问题吗
答案1
正确的方法是创建虚拟环境。
yum -y install wget gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libffi-devel libxslt libxslt-devel libxml2 libxml2-devel openldap-devel libjpeg-turbo-devel openjpeg-devel libtiff-devel git libpng libXext libz.so.1 xorg-x11-fonts-Type1 curl cabextract
cd /usr/local/src
wget http://python.org/ftp/python/2.7.8/Python-2.7.9.tgz
tar -xzf Python-2.7.9.tgz
cd Python-2.7.9
./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make
make altinstall
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | /usr/local/bin/python2.7
/usr/local/bin/easy_install-2.7 pip virtualenv
这是你在 centos 6.6 上必须拥有的
[root@server ~]# python --version
Python 2.6.6
[root@server ~]# yum install python
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror1.babylon.network
* epel: mirror1.babylon.network
* extras: mirror1.babylon.network
* updates: mirror1.babylon.network
Package python-2.6.6-52.el6.x86_64 already installed and latest version
Nothing to do
[root@server ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)
这是我找到的完整指南: https://odootricks.wordpress.com/2014/09/30/installing-odoo-8-on-centos-6-with-virtual-python-install/