ConfigurationError:服务器在127.0.0.1:27017报告的有线版本为0,但此版本的PyMongo至少需要2(MongoDB 2.6) [英] ConfigurationError: Server at 127.0.0.1:27017 reports wire version 0, but this version of PyMongo requires at least 2 (MongoDB 2.6)

查看:769
本文介绍了ConfigurationError:服务器在127.0.0.1:27017报告的有线版本为0,但此版本的PyMongo至少需要2(MongoDB 2.6)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用mongoDB和Python Flask构建应用程序.运行该应用程序时,出现以下错误:

I am trying to build an application with mongoDB and Python Flask. While running the application, I am getting below error:

ConfigurationError:位于127.0.0.1:27017的服务器报告的连线版本为0, 但是此版本的PyMongo至少需要2个(MongoDB 2.6).

ConfigurationError: Server at 127.0.0.1:27017 reports wire version 0, but this version of PyMongo requires at least 2 (MongoDB 2.6).

有人可以帮我吗?

谢谢, Balwinder

Thanks, Balwinder

推荐答案

首先从ubuntu软件中心更改服务器,然后按照步骤

First you change the server from ubuntu software center follow step

1-搜索软件&在ubuntu软件中心更新

1- Search Software & update in ubuntu software center

2-选择Download from选择Other,然后在右侧选择Select best server,如果完成则需要一些时间

2- Select Download from select Other then right side select Select best server it will take some time if it's complete

尝试通过此命令重新安装mongodb

try to re install mongodb from this command

第1步

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

第2步

sudo apt-get update

第3步

sudo apt-get install -y mongodb-org

这篇关于ConfigurationError:服务器在127.0.0.1:27017报告的有线版本为0,但此版本的PyMongo至少需要2(MongoDB 2.6)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆