IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    composer安装疑难问题处理

    unvs发表于 2024-06-05 04:17:48
    love 0

    一、composer 更新提示 [Composer\Downloader\TransportException] Peer fingerprint did not match

     

    出现这个问题可能是php版本问题,切换至PHP7.0版本看是否可行。如果不行,则重装composer

    因为使用的 lnmp 装的系统,自带 composer,php -v 发现 cil 的版本是 5.4.
    修改下 PHP 的 cil 版本,然后重新安装下 composer 就可以了.
    https://blog.csdn.net/lmp5023/article/details/102755061

    二、Composer update遇到 Content-Length mismatch, received 137675 bytes out of the expected 2367236

    1、查看当前镜像源 composer config -l

    2、上图可以看到使用的是国外镜像,此处要使用中国镜像源
    composer config repo.packagist composer https://mirrors.aliyun.com/composer/

    3、再次确认镜像源情况

    三、composer报错版本太旧
    提示黄色“Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2”

    解决办法:

    升级本地的composer版本

    composer self-update
    或
    composer self-update -vvv

    四、PHP安装TP6的composer install报Undefined index: process
    解决办法:没有添加Swoole扩展
    或者看黄色提示“The Process class relies on proc_open, which is not available on your PHP installation.”
    需要打开php禁用的函数 proc_open

    五、安装消息队列beanstalkd扩展方法

    http://www.04007.cn/article/249.html

    http://www.04007.cn/article/480.html

    六、宝塔安装开启swoole扩展

    https://blog.csdn.net/weixin_30652271/article/details/97671719

    七、安装成功,黄色提示
    Package mtdowling/cron-expression is abandoned, you should avoid using it. Use dragonmantank/cron-expression ins
    tead.Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.

     

    八、

    Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/

    原因:composer版本太低了

    解决方法:升级composer

    升级命令:composer self-update



沪ICP备19023445号-2号
友情链接