在作曲家中执行 git clone 失败
Posted
技术标签:
【中文标题】在作曲家中执行 git clone 失败【英文标题】:Failed to execute git clone in composer 【发布时间】:2015-03-21 02:11:40 【问题描述】:我正在尝试在我的 laravel 站点中安装我在 git 上创建的东西,当我点击 composer update 我有 git 版本 2.0.1 而我的 mac 版本是 10.8.5 时,我不断收到这个错误
[运行时异常] 无法执行 git clone --no-checkout 'git@bitbucket.org:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test/tinymce' && cd '/Applications/MAMP /htdocs/test-modules/vendor/test/tinymce' && git 远程添加作曲家 'git@bitbucket.org:PATH-TO-REPO.git' && git fetch composer dyld:惰性符号绑定失败:找不到符号:___strlcpy_chk 引用自:/usr/local/git/bin/git 预期在:/usr/lib/libSystem.B.dylib dyld:找不到符号:___strlcpy_chk 引用自:/usr/local/git/bin/git 预期在:/usr/lib/libSystem.B.dylib sh:第 1 行:504 跟踪/BPT 陷阱:5 git clone --no-checkout 'git@bitbucket.org:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test/微小的'
在我的 composer.json 我有
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require":
"laravel/framework": "4.2.6",
"test/tinymce": "dev-master",
"test/uploadify": "dev-master",
"mews/captcha": "dev-master"
,
"require-dev":
"way/generators": "~2.0"
,
"autoload":
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php",
"app/modules"
]
,
"scripts":
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
,
"config":
"preferred-install": "dist"
,
"minimum-stability": "stable",
"repositories": [
"type": "composer",
"url": "http://localhost:8888/test-modules/packages.json"
]
在我的 packages.json 中
"packages":
"test/tinymce":
"dev-master":
"name": "test/tinymce",
"version": "dev-master",
"source":
"url": "git@bitbucket.org:PATH-TO-REPO.git",
"type": "git",
"reference": "master"
,
"test/uploadify":
"dev-master":
"name": "test/uploadify",
"version": "dev-master",
"source":
"url": "git@bitbucket.org:PATH-TO-REPO.git",
"type": "git",
"reference": "master"
【问题讨论】:
看起来像一个链接错误。尝试重新安装 git? Private composer packages - no valid composer.json was found的可能重复 【参考方案1】:dyld:未找到符号:___strlcpy_chk
您需要重新安装 Git。在 macOS 上,使用 Brew,例如:git reinstall git
。当您的程序指向错误或过时的库时,通常会出现此问题。
【讨论】:
以上是关于在作曲家中执行 git clone 失败的主要内容,如果未能解决你的问题,请参考以下文章
来自git clone的Laravel项目无法正常工作(无法使用key:generate或composer install / update)