TP5.1使用composer安装验证码库的时候报错怎么解决,急求

Author: zls511131 - Posted:5年前 - View:1751

原来使用TP的时候已经是两年前的事了,听说TP版本已经到了5+了,我自己也想做个小博客,所以使用了TP,但是在使用TP5.1的时候,安装TP的验证码库的时候,报错了,都找不到解决方法,搜索了网上也没有解决我的问题,具体的报错信息如下:

# composer require topthink/think-captcha
Using version ^3.0 for topthink/think-captcha
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for topthink/think-captcha ^3.0 -> satisfiable by
topthink/think-captcha[v3.0.0].
    - topthink/think-captcha v3.0.0 requires topthink/framework ^6.0.0 -> sat
isfiable by topthink/framework[6.0.x-dev, v6.0.0-rc2] but these conflict with
 your requirements or minimum-stability.
0 人点赞  ∙  0 人收藏  
加入收藏 点赞 我要评论

目前共有 3 条回复

anmore
- anmore - 5年前

网上搜不到答案,但是楼主没注意看TP官方文档下面的留言,留言中有人遇到了跟楼主一样的问题的,只要在composer后强制加上验证码库的版本就能下载成功了。

# composer require topthink/think-captcha=2.*

不妨先试一下,希望能解决楼主的问题。^_^

coding
- coding - 5年前

从报错信息中可以看出,验证码三是给TP6使用的,而要在TP5中使用,则只能指定下载版本二了,除层主提供的下载方法外,还可以下载dev二版本的验证码库:

$ composer require topthink/think-captcha 2.0.x-dev
xiedong
- xiedong - 4年前

指定下载版本就解决了,话说TP6现在出预览版了,不清楚有多少人下载试用过!!!