首頁  >  文章  >  開發工具  >  使用composer時報錯提示“沒有此遠端composer”怎麼辦?

使用composer時報錯提示“沒有此遠端composer”怎麼辦?

藏色散人
藏色散人轉載
2021-03-25 17:26:042321瀏覽

下面由composer教學專欄帶大家介紹使用composer時報錯提示「沒有此遠端composer」怎麼辦,希望對需要的朋友有幫助!

使用composer時報錯提示“沒有此遠端composer”怎麼辦?

具體報錯問題:

使用composer時報錯提示“沒有此遠端composer”怎麼辦?

#但是我手動呼叫git clone那幾個位址都是可以clone的...

解決方法:

經過翻看composer在github的issues,查到一個解決辦法,因為我是從symfony官網下載的帶有vendor的2.1.4版本,然後解壓縮之後就執行了composer update 但是遇到了這個錯誤,github上回复說:

justin-amt commented 4 months ago

#I have exactly same problem on php composer.phar update

[RuntimeException]
Failed to clone http://github.com/fabpot/Twig.git via git, https and http protocols, aborting.

- git://github.com/fabpot/Twig.git
fatal: No such remote 'composer'

- https://github.com/fabpot/Twig.git
fatal: No such remote 'composer'

- http://github.com/fabpot/Twig.git
fatal: No such remote 'composer'

How to correct it ?

Seldaek commented 4 months ago
@justinamt that looks like you have an outdated vendor dir (from a very old composer.phar) just delete the vendor/* and run very old composer.phar) just delete the vendor/* and run install to update a up to date.

from https://github.com/composer/composer/issues/613

於是我mv了vendor資料夾,然後執行composer install 發現可以正常下載了。

以上是使用composer時報錯提示“沒有此遠端composer”怎麼辦?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:segmentfault.com。如有侵權,請聯絡admin@php.cn刪除