无法自我更新作曲家? [英] Unable to self-update composer?

查看:113
本文介绍了无法自我更新作曲家?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力地更新作曲家!

I am trying to update composer with no luck!

我尝试过的事情:

$ composer self-update

[InvalidArgumentException]
未定义命令自我更新".

[InvalidArgumentException]
Command "self-update" is not defined.

$ sudo -H composer self-update

[InvalidArgumentException]
未定义命令自我更新".

[InvalidArgumentException]
Command "self-update" is not defined.

$ sudo apt-get install composer

正在读取包列表...完成构建依赖关系树的读取 状态信息...作曲家已经是最新版本.这 以下软件包已自动安装,不再存在 必需:libntdb1 linux-headers-4.2.0-30 linux-headers-4.2.0-30-generic linux-image-4.2.0-30-generic linux-image-extra-4.2.0-30-generic python-ntdb使用'apt-get autoremove'将其删除.已升级0个,新安装了0个,删除了0个 和10个未升级.

Reading package lists... Done Building dependency tree Reading state information... Done composer is already the newest version. The following packages were automatically installed and are no longer required: libntdb1 linux-headers-4.2.0-30 linux-headers-4.2.0-30-generic linux-image-4.2.0-30-generic linux-image-extra-4.2.0-30-generic python-ntdb Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

我正在尝试自我更新作曲家,因为每次尝试时都面临以下问题:

I am trying to self-update composer because I am facing the following each time I try:

$ composer update

使用软件包信息加载composer存储库正在更新 依赖关系(包括require-dev) [RuntimeException]
无法将rmrevin/yii2-fontawesome软件包加载到 http://packagist.org :[UnexpectedValueException]无法解析 版本限制v4.1.:无效的版本字符串"v4.1."
[UnexpectedValueException]
无法解析版本限制v4.1.:无效的版本字符串 "v4.1."

Loading composer repositories with package information Updating dependencies (including require-dev) [RuntimeException]
Could not load package rmrevin/yii2-fontawesome in http://packagist.org: [UnexpectedValueException] Could not parse version constraint v4.1 .: Invalid version string "v4.1."
[UnexpectedValueException]
Could not parse version constraint v4.1.: Invalid version string "v4.1."

关于如何解决此问题的任何想法?

Any Ideas on how to fix this issue?

我的php版本是:

php --version

PHP 5.6.11-1ubuntu3.4(CLI)版权所有(c)1997-2015 The PHP Group Zend Engine v2.6.0,版权所有(c)1998-2015 Zend Technologies 与Zend OPcache v7.0.6-dev,Zend Technologies版权所有(c)1999-2015

PHP 5.6.11-1ubuntu3.4 (cli) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

我的作曲家版本是:

composer --version

作曲家版本@ package_branch_alias_version @(@ package_version @) @release_date @

Composer version @package_branch_alias_version@ (@package_version@) @release_date@

推荐答案

根据@JimL注释,我能够通过以下方式自我更新作曲家:

As per @JimL comment I was able to self update composer by:

  • 从程序包管理器(apt)卸载Composer.
  • 我根据官方文档进行了安装
  • Uninstalling Composer from the package manager (apt).
  • I installed it according to the official documentation

现在它可以正常工作了.

Now it works as expected.

这篇关于无法自我更新作曲家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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