[英]Adding git repository with Composer for development branch where no composer.json present
I have been trying to install a git repository that does not have a composer.json file. 我一直在尝试安装没有composer.json文件的git存储库。 I followed the instructions on the composer website and also found in this stackexchange post: Composer - adding git repository without composer.json
我遵循了composer网站上的说明,也可以在以下stackexchange帖子中找到该内容: Composer-添加不带composer.json的git库
However, I am still not able to get it to work. 但是,我仍然无法使其正常工作。 I keep getting an error stating: "The requested package phpredis/phredis could not be found in any version, there may be a typo in the package name.
我不断收到错误消息:“在任何版本中都找不到所请求的软件包phpredis / phredis,软件包名称中可能有错字。
This is my composer.json file on my system (note that predis/predis loads fine but I want to use the other redis package): 这是我的系统上的composer.json文件(请注意predis / predis可以很好地加载,但是我想使用其他redis包):
{
"respositories": [
{
"type":"package",
"package":
{
"name":"phpredis/phpredis",
"version":"develop",
"dist":
{
"url":"https://github.com/phpredis/phpredis.git",
"type":"git"
}
}
}
],
"require": {
"predis/predis": "^1.0",
"phpredis/phpredis":"dev-master@dev"
}
}
I know that I must be making a simple error somewhere but I have spent hours and can't figure it out. 我知道我一定在某个地方犯了一个简单的错误,但是我已经花了数小时而无法弄清楚。 Thanks for the help.
谢谢您的帮助。
It's useless to fiddle with any composer.json
replacement for this repository because it contains C software that needs to be compiled and installed as a PHP extension. 对该库进行任何
composer.json
替换都无济于事,因为它包含需要编译和安装为PHP扩展的C软件。 Composer won't do this for you, it can only manage PHP source code. Composer不会为您执行此操作,它只能管理PHP源代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.