在thinkphp6.1.1中composer安装 liliuwei/thinkphp-jump报错

hykeda3年前ThinkPHP2007

报错内容:

Problem 1
    - Root composer.json requires liliuwei/thinkphp-jump ^1.5 -> satisfiable by liliuwei/thinkphp-jump[v1.5].
    - liliuwei/thinkphp-jump v1.5 requires topthink/think-view ^1.0 -> found topthink/think-view[v1.0.0, ..., v1.0.14] but it conflicts with your root composer.json require (^2.0).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require liliuwei/thinkphp-jump:*" to figure out if any version is installable, or "composer require liliuwei/thinkphp-jump:
^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

提示jump和view冲突了,所以我这边先移除了view

composer  remove topthink/think-view

然后再安装 composer require liliuwei/thinkphp-jump


thinkphp6.0安装

composer require liliuwei/thinkphp-jump=1.*

thinkphp8.0安装

composer require liliuwei/thinkphp-jump=2.*


安装后在安装topthink/think-view,但是这里要指定版本,不然还是会冲突

composer require topthink/think-view v1.0.14

然后就安装成功。


如果指定安装了tp版本,比如指定了 

composer create-project topthink/think=6.0.*

安装后是最新的6.0.13,但是如果你直接去执行:composer require topthink/think-view,这样你的thinkphp版本会变成6.1,需要php版本为8以上。所以安装view时必须指定版本为1.0的。不然会莫名其妙发现tp版本变了



添加指定版本扩展:

composer create-project topthink/think:"5.1.*"
composer create-project topthink/think=5.1.*
composer require topthink/think-view  v1.0.14
composer require topthink/think-view ">=1.0.14"

移除:

composer remove topthink/think-image


相关文章

在thinkphp6中使用依赖注入或容器来创建对象

很多时候,在自己的控制器中需要调用另一个控制器中的方法,但是没有直接的继承关系,比如两个控制器同时继承了一个common类。如果我们直接new一个控制器中的类,就会提示Too few&nbs...

composer升级thinkphp版本

之前用的thinkphp版本为tp5.0.12,最近tp已经更新到5.0.19以及5.1版本的5.1.12。 我一开始在目录下面直接使用了composer update...

thinkphp5页面出现500服务器内部错误

    最近写项目发现页面显示正常,控制器单独输出调试都正常,数据返回了,但还是报错get请求报错500服务器内部错误。  &nbs...

thinkphp5 微信token验证不通过

刚想接入下微信公众平台,用了最新的tp5,之前用的是tp3.2.3,发现配置好文件后,微信后台一直提示token验证失败。 但是直接在入口文件写echo $_GET["echostr"];就会提...

thinkphp6 安装扩展jump后如何配置

thinkphp6 安装扩展jump后如何配置

config中jump.php配置跳转提示页面...

thinkphp6 前置和后置中间件的区别以及特殊情况

首先官方文档是这么描述的:中间件是在请求具体的操作之前还是之后执行,完全取决于中间件的定义本身。下面是一个前置行为的中间件 (Before命名是随意的):<?php namespace&n...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。