作曲家 - 无法在Windows上安装mongodb / mongodb(Composer - Unable to install mongodb/mongodb on Windows)
我试图在使用composer的Laravel安装中安装以下软件包:
jenssegers/mongodb
但是当安装时,我收到以下错误:
- jenssegers/mongodb v3.0.0 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1]. - jenssegers/mongodb v3.0.1 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1]. - jenssegers/mongodb v3.0.2 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1]. - mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - Installation request for jenssegers/mongodb ^3.0 -> satisfiable by jenssegers/mongodb[v3.0.0, v3.0.1, v3.0.2].
当我运行
composer show -p
时,扩展名实际上是这样列出的:ext-mongo 1.6.12 The mongo PHP extension
当我执行php_info()或其他任何操作时,它也会正确启用。
我也确定我在正确的php.ini文件中启用了它。
其实,我想这个问题来自于它应该被称为
mongodb
而不是mongo
。他们是否有任何针对Windows的解决方案?
谢谢。
I'm trying to install the following package on my Laravel installation using composer :
jenssegers/mongodb
But when installing, I'm getting the following error :
- jenssegers/mongodb v3.0.0 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1]. - jenssegers/mongodb v3.0.1 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1]. - jenssegers/mongodb v3.0.2 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1]. - mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - Installation request for jenssegers/mongodb ^3.0 -> satisfiable by jenssegers/mongodb[v3.0.0, v3.0.1, v3.0.2].
The extension is actually listed when I run
composer show -p
like that :ext-mongo 1.6.12 The mongo PHP extension
and it's also enabled correctly when I do php_info() or anything.
I'm also sure that I enabled it in the correct php.ini file.
Actually, I guess that the problem comes from the fact that it should be called
mongodb
instead ofmongo
.Is their any fix for this for Windows ?
Thanks.
原文:https://stackoverflow.com/questions/35994943
满意答案
您需要明确提供比较器,此时您不需要:
var tenantsList = (from t in db.Tenants select t) .Distinct(new TenantComparer()) .OrderBy( x => x.Name ) .ToList();
请参阅文档 。
You need to provide comparer explicitly, which at the moment you do not:
var tenantsList = (from t in db.Tenants select t) .Distinct(new TenantComparer()) .OrderBy( x => x.Name ) .ToList();
See the documentation.
相关问答
更多LINQ区别不使用IEqualityComparer?(LINQ Distinct not using the IEqualityComparer? [duplicate])
LINQ.Distinct IEquatable对象不起作用(LINQ.Distinct on IEquatable object doesn't work)
为什么LINQ中的区别对于这种情况不起作用?(Why distinct in LINQ does not work for this case?)
使用Linq的不同行(Distinct rows using Linq)
Linq明显无法正常工作(Linq distinct not working correctly)
Linq选择由两个属性Distinct(Linq select Distinct by two properties)
MySQL COUNT(CASE WHEN ... THEN DISTINCT列)(MySQL COUNT(CASE WHEN … THEN DISTINCT Column))
Linq to SQL order by Distinct(Linq to SQL order by with Distinct)
选择与Linq to Entities不同(Select Distinct with Linq to Entities)
区别使用条件Linq(Distinct Using Condition Linq)
相关文章
更多windows系统安装MongoDB
MongoDB学习(一):MongoDB 环境的搭建
solr mongoDB 对比
MongoDB的安装与使用_深入浅出MongoDB(二)
基于linux安装MongoDB
深入浅出MongoDB(一):认识MongoDB
MongoDB学习(三):MongoDB Shell的使用
MongoDB: The Definitive Guide
MongoDB之Hadoop驱动介绍
Mongodb与spring集成(1)------配置
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!