我正在尝试在 Laravel 站点中安装我在 git 上创建的东西,当我点击 Composer Update 时,我不断收到此错误,我的 git 版本为 2.0.1,我的 mac 版本为 10.8.5
[运行时异常]
无法执行 git clone --no-checkout '[email protected]:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test/tinymce' && cd '/Applications/ MAMP/htdocs/test-modules/vendor/test/tinymce' && git
远程添加作曲家'[电子邮件受保护]: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 Trace/BPT 陷阱:5 git clone --no-checkout '[email protected]:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test /tinymce'
在我的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": "[email protected]:PATH-TO-REPO.git",
"type": "git",
"reference": "master"
}
}
},
"test/uploadify": {
"dev-master": {
"name": "test/uploadify",
"version": "dev-master",
"source": {
"url": "[email protected]:PATH-TO-REPO.git",
"type": "git",
"reference": "master"
}
}
}
}
}
dyld:找不到符号:___strlcpy_chk
您需要重新安装 Git。在 macOS 上,使用 Brew,例如:
git reinstall git
。当您的程序指向错误或过时的库时,这通常是问题所在。