I'm trying to install something that I created on git in my laravel site and I keep getting this error when I hit composer update I have git version 2.0.1 and my mac is version 10.8.5
[RuntimeException]
Failed to execute 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
remote add composer 'git#bitbucket.org:PATH-TO-REPO.git' && git fetch composer
dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
Referenced from: /usr/local/git/bin/git
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___strlcpy_chk
Referenced from: /usr/local/git/bin/git
Expected in: /usr/lib/libSystem.B.dylib
sh: line 1: 504 Trace/BPT trap: 5 git clone --no-checkout 'git#bitbucket.org:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test/tinymce'
In my composer.json I have
{
"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"
}
]
}
and in my 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"
}
}
}
}
}
dyld: Symbol not found: ___strlcpy_chk
You need to re-install your Git. On macOS, use Brew, e.g.: git reinstall git. This is usually the issue when your program points to the wrong or outdated libraries.
Related
I have gitlab repository https://gitlab.com/ajkosh/yii2-admin and below is my composer.json:
{
"name": "haruatari/yii2-module-app",
"description": "Empty module application on Yii2",
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Viktor Pikaev",
"email": "haruatari#gmail.com",
"homepage": "http://haru-atari.com/about"
}
],
"repositories": [
{
"type": "vcs",
"url": "git#github.com:ajkosh/yii2-admin.git"
}
],
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "2.0.15",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"paulzi/yii2-materialized-path": "^2.0",
"kartik-v/yii2-widget-select2":"2.0.4",
"ajkosh/yii2-admin": "dev"
},
"require-dev": {
"codeception/codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"config": {
"fxp-asset": {
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"process-timeout": 1800},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"data": "0777",
"data/log": "0777",
"data/tmp": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
}
}
}
I am trying to fetch yii2-admin from my own repository but I am getting below error when I am running composer update.
Problem 1
- The requested package ajkosh/yii2-admin could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
You're using incorrect package name. On resolving dependencies package name in URL is irrelevant, the only name what matters is package name in composer.json. So Composer reads composer.json from your forked repository, and finds name mdmsoft/yii2-admin, because you don't changed it after forking. There is no ajkosh/yii2-admin at all. You should either update package name in composer.json in your fork:
{
"name": "ajkosh/yii2-admin",
"description": "RBAC Auth manager for Yii2 ",
"keywords": ["yii", "admin", "auth", "rbac"],
"type": "yii2-extension",
...
Or use source package name in your require section:
"require": {
...
"mdmsoft/yii2-admin": "dev-master"
},
I have a yii2 project with a local extension:
home/
packages/
yii2-unipv-gii/ < my extension
composer.json (1)
projects/
my-project/ < my project
composer.json (2)
I would like to install the extension in the Yii2 project with the use of path type of repository that create a symlink with the extension folder.
I have composer.json (1)
{
"name": "unipvsag/yii2-unipv-gii",
"type": "yii2-extension",
"keywords": ["yii2","extension","unipv"],
"license": "MIT",
"minimum-stability": "dev",
"require": {
"yiisoft/yii2": "~2.0.0"
},
"autoload": {
"psr-4": {
"unipvsag\\unipvgii\\": ""
}
},
"extra": {
"bootstrap": "unipvsag\\unipvgii\\Bootstrap"
}
}
and composer.json (2)
{
"name": "unipv/accesso-Programmato",
"type": "project",
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"prefer-stable": true,
"repositories":[
{
"type": "path",
"url": "../../packages/yii2-unipv-gii"
}
],
"require": {
----other packages----
"unipvsag/yii2-unipv-gii": "dev-master"
},
"config": {
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"scripts": {
}
}
The problem is on composer update I receive this error:
[InvalidArgumentException]
Unknown downloader type: . Available types: git, svn, fossil, hg, perforce, zip, rar, tar, gzip, xz, phar, file, path.
It is a problem of the project or of the extension?
I want to install HumHub (github.com/humhub/humhub) with my own composer file. But composer do not install humhub dependencies.
Here is my composer.json:
{
"name": "my-project",
"type": "project",
"repositories": [
{
"type": "package",
"package": {
"name": "humhub/humhub",
"version": "1.1.1",
"source": {
"url": "https://github.com/humhub/humhub.git",
"type": "git",
"reference": "master"
}
}
}
],
"require": {
"humhub/humhub": "1.1.1"
}
}
Do you get any error messages? Are you trying to get humhub using git, not packagist or so? If you are fetching directly from github, try
"repositories": [{ "type": "git", "url": "https://github.com/humhub/humhub.git"}]
and leave "require" as you have it now.
EDIT: I just noticed, that there is nothing tagged as "1.1.1" on humhub's repository. You can find a tag "v1.1.1", therefore change your "require" to:
"require": {"humhub/humhub": "dev-master#v1.1.1"}
According to the composer documentation, here is how add a git repository as a composer dependency.
I've modified their example to use the humhub library.
{
"name": "my-project",
"type": "project",
"require": {
"humhub/humhub": "dev-master#1.1.1"
},
"repositories": [
{
"type": "vcs",
"url": "git#bitbucket.org:humhub/humhub.git"
}
]
}
you can also try the humhub composer installer: https://github.com/move-elevator/humhub-composer-installer
I had issue when i add code "laravelcollective/html": "5.3.*" in composer.json, and then i try to update composer via command line in windows and show this in my command line.
PLEASE HELP ME GUYS, THANKS :))
always show like this, if i try to update composer
This my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*"
"laravelcollective/html": "5.3.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
You're missing a comma(,) here "laravel/framework": "5.3.*",
If invalid json error occurred you can check which line creates error by validating your json code here. Just paste your code and it will highlight the line(s) for you.
You may try to change the line where it gives an error to something like this.
"laravelcollective/html": "^5.2",
ANd to make it easier. Add a comma at the end of the
"laravel/framework": "5.3.*"
Hope it could help.
Correct answer :D
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"laravelcollective/html": "^5.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
Finally i can update composer :D
Update your laravel/framework dependency to 5.3.* in your composer.json file.
You should also upgrade your symfony/css-selector and symfony/dom-crawler dependencies to 3.1.* in the require-dev section of your composer.json file.
I think question is almost same but error is different.
I just install laravel 5.2 and trying to install quickadmin packages. But I got this error. I also update composer. I tried this suggestion and also some other suggestions. But It's not working. I also tried older version of composer.json configuration. But unfortunately It's not working.
Error:
Here is my Composer.json configuration without changing anything.
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
Any suggestions how to solve in laravel 5.2?