qin
环境:centos7
在虚拟机上安装pg高可用patroni的时候,安装失败,提示缺少依赖,但是已经按照python3.6,也做了软链接。为什么安装失败了呢。

您好,其实我的意思是,使用yum install -y patroni-2.1.3-1.rhel7.x86_64.rpm
这条命令来代替rpm -ivh patroni-2.1.3-1.rhel7.x86_64.rpm
或者,不去管那个patroni-2.1.3-1.rhel7.x86_64.rpm,而直接使用pip3安装,pip3 install patroni
另外,您这个rpm是从哪里下载的呢?



还有其他的依赖也没装,建议直接用yum install patroni-2.1.3-1.rhel7.x86_64.rpm
进行安装


使用 yum install patroni-2.1.3-1.rhel7.x86_64.rpm 下载好patroni后,rpm -ivh patroni-2.1.3-1.rhel7.x86_64.rpm 时报如下错误。
[root@localhost data]# rpm -ivh patroni-2.1.3-1.rhel7.x86_64\ \(1\).rpm
warning: patroni-2.1.3-1.rhel7.x86_64 (1).rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
error: Failed dependencies:
/usr/bin/python3 is needed by patroni-2.1.3-1.rhel7.x86_64
python(abi) = 3.6 is needed by patroni-2.1.3-1.rhel7.x86_64
python3-cdiff is needed by patroni-2.1.3-1.rhel7.x86_64
python3-psutil >= 2.0.0 is needed by patroni-2.1.3-1.rhel7.x86_64
python3-psycopg2 >= 2.5.4 is needed by patroni-2.1.3-1.rhel7.x86_64
python3-ydiff >= 1.2 is needed by patroni-2.1.3-1.rhel7.x86_64
python36-PyYAML is needed by patroni-2.1.3-1.rhel7.x86_64
python36-click >= 4.1 is needed by patroni-2.1.3-1.rhel7.x86_64
python36-dateutil is needed by patroni-2.1.3-1.rhel7.x86_64
python36-prettytable >= 0.7 is needed by patroni-2.1.3-1.rhel7.x86_64
python36-six >= 1.7 is needed by patroni-2.1.3-1.rhel7.x86_64
然后我使用如下命令安装上述依赖:
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
mkdir /usr/lib/python3.6
./configure --prefix=/usr/lib/python3.6 --with-ssl
ln -s /usr/lib/python3.6/bin/python3.6 /usr/bin/python3
ln -s /usr/lib/python3.6/bin/pip3.6 /usr/bin/pip3
ln -s /usr/bin/pip3 /usr/bin/pip
rm -f /usr/bin/python
ln -s /usr/bin/python3 /usr/bin/python
pip3 install abi
pip3 install cdiff
pip3 install psutil
pip3 install psycopg2
pip3 install ydiff
pip3 install PyYAML
pip3 install click
pip3 install python-dateutil
pip3 install prettytable
pip3 install six
结果再使用rpm -ivh patroni-2.1.3-1.rhel7.x86_64.rpm安装时还是报错,报错结果跟上面一样。
渴望得到解答,谢谢。


yum install 就是执行的是下载并安装,而且会自动把相关依赖给装上,为什么还要去执行一次rpm命令?


