整理最近遇到的错误解决方法

问题一:
安装psycopg2-binary报错

[root@node1 Python-3.7.13]# pip install psycopg2-binary
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/psycopg2-binary/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/psycopg2-binary/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/psycopg2-binary/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/psycopg2-binary/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/psycopg2-binary/
Could not fetch URL https://pypi.org/simple/psycopg2-binary/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/psycopg2-binary/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement psycopg2-binary (from versions: none)
ERROR: No matching distribution found for psycopg2-binary
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

问题一 :解决方法

[root@node1 Python-3.7.13]pip install psycopg2-binary -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/, http://mirrors.aliyun.com/pypi/simple
Collecting psycopg2-binary
  Downloading http://mirrors.aliyun.com/pypi/packages/6f/ac/0cc0412f1710598537af8021a7c63334daaa8d3474d17133a6805bf54f5b/psycopg2_binary-2.9.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 16.2 MB/s eta 0:00:00
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.9.7
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.
You should consider upgrading via the '/usr/local/python3/bin/python3.7 -m pip install --upgrade pip' command.

问题二:
python3.7 以上版本需要一个新的依赖包 libffi-devel,系统环境中缺乏这个包

ModuleNotFoundError: No module named '_ctypes'

问题二:解决方法

[root@node1 Python-3.7.13]# yum install libffi-devel -y
[root@node1 Python-3.7.13]# make install   #Python3安装目录下重新编译安装Python
[root@node1 Python-3.7.13]# pip install patroni[etcd] -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

问题三:
新Etcd节点,启动失败无法加入到集群

Aug 23 23:00:59 localhost etcd: publish error: etcdserver: request timed out

问题三:解决方法 删除集群下所有节点的数据,使他重新同步

[root@localhost ~]# systemctl start etcd
Job for etcd.service failed because a timeout was exceeded. See "systemctl status etcd.service" and "journalctl -xe" for details.
[root@localhost ~]# cd /var/lib/etcd/
[root@localhost etcd]# ll
total 0
drwx------ 3 etcd etcd 20 Aug 23 23:04 pg2.etcd
[root@localhost etcd]# mv pg2.etcd/ /tmp/
[root@localhost etcd]# systemctl start etcd
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值