Composer install: your requirements could not be resolved to an installable set of packages - bolt-cms

Trying to install Bolt v2.2.4 with the following commands:
git clone git://github.com/bolt/bolt.git bolt
cd bolt
git checkout v2.2.4
composer install
Then I get the following error:
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for m6web/symfony2-coding-standard dev-master#dev -> satisfiable by m6web/symfony2-coding-standard[dev-master].
- m6web/symfony2-coding-standard dev-master requires squizlabs/php_codesniffer ~1.0 -> no matching package found.
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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

I just ran into the same issue under bolt 2.1.9
I 'fixed' it for me for the moment by changing 1.5.* to ~2 for squizlabs/php_codesniffer in composer.json

Are you on IPv6 per chance? If so, do a composer self-update.

Related

Update package installed from git in Yarn 3

How to update a proprietary dependency installed from Git repo with Yarn 3?
package.json entry:
"#foo/utils": "git+https://gitlab+deploy-token-...:...#gitlab.com/foo/bar.git#ISSUE-6652-some-git-branch",
yarn up #foo/utils results in the following error:
➤ YN0027: #foo/utils#git+https://gitlab+deploy-token-...:...#gitlab.com/foo/bar.git#ISSUE-6652-some-git-branch can't be resolved to a satisfying range
Internal Error: The remote server failed to provide the requested resource
I need to update the package to latest commit in that branch and the only way I currently know is removing entry for this package manually from yarn.lock, but I guess that's not how things should be done.
It's not ideal since it's interactive, but you can run yarn up -i #foo/utils and choose "reuse" to force the package to resolve (and reinstall) from the same git source again.

Installing cdo - libproj13 is missing

Dear proj and cdo specialists,
I am trying to install cdo (climate data operator) on Ubuntu 18.04. I have gdal 3.0.0 and proj 7.0.1 installed. There are some missing dependencies which cannot be installed. It boils down to the point where it says libproj13 is missing and cannot be installed.
What I have done so far. Install cdo, it depends libmagplus3v5, this depends libgeotiff2, this depends libproj13, this can't be installed. See here:
root#eosao34:~# apt-get install cdo
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
cdo : Depends: libmagplus3v5 (>= 2.34.1-2~) but it is not going to be installed
Recommends: python-cdo but it is not installable
E: Unable to correct problems, you have held broken packages.
root#eosao34:~# apt-get install libmagplus3v5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagplus3v5 : Depends: libgeotiff2 (>= 1.4.0) but it is not going to be installed
Depends: libterralib3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root#eosao34:~# apt-get install libgeotiff2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgeotiff2 : Depends: libproj13 (>= 4.8.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
root#eosao34:~# apt-get install libproj13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libproj13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libproj13' has no installation candidate
root#eosao34:~#
When I search for libproj1. I get this:
root#eosao34:~# locate libproj1
/usr/share/doc/libproj12
/usr/share/doc/libproj15
/usr/share/doc/libproj19
/usr/share/doc/libproj12/NEWS.Debian.gz
/usr/share/doc/libproj12/changelog.Debian.gz
/usr/share/doc/libproj12/copyright
/usr/share/doc/libproj15/AUTHORS
/usr/share/doc/libproj15/NEWS.Debian.gz
/usr/share/doc/libproj15/NEWS.gz
/usr/share/doc/libproj15/README.gz
/usr/share/doc/libproj15/changelog.Debian.gz
/usr/share/doc/libproj15/copyright
/usr/share/doc/libproj19/AUTHORS
/usr/share/doc/libproj19/NEWS.Debian.gz
/usr/share/doc/libproj19/NEWS.gz
/usr/share/doc/libproj19/README
/usr/share/doc/libproj19/changelog.Debian.gz
/usr/share/doc/libproj19/copyright
/var/cache/apt/archives/libproj12_4.9.3-2_amd64.deb
/var/cache/apt/archives/libproj19_7.0.0-1~bionic0_amd64.deb
/var/lib/dpkg/info/libproj12:amd64.list
/var/lib/dpkg/info/libproj12:amd64.md5sums
/var/lib/dpkg/info/libproj12:amd64.shlibs
/var/lib/dpkg/info/libproj12:amd64.symbols
/var/lib/dpkg/info/libproj12:amd64.triggers
/var/lib/dpkg/info/libproj15:amd64.list
/var/lib/dpkg/info/libproj15:amd64.md5sums
/var/lib/dpkg/info/libproj15:amd64.shlibs
/var/lib/dpkg/info/libproj15:amd64.symbols
/var/lib/dpkg/info/libproj15:amd64.triggers
/var/lib/dpkg/info/libproj19:amd64.list
/var/lib/dpkg/info/libproj19:amd64.md5sums
/var/lib/dpkg/info/libproj19:amd64.shlibs
/var/lib/dpkg/info/libproj19:amd64.symbols
/var/lib/dpkg/info/libproj19:amd64.triggers
So apparently i have libproj12, libproj15 and libproj19 installed.
I have the feeling that libprojXX is delivered with a specific version of proj. Because I have tried installing different versions of proj from apt package manager and now see all the different versions of libprojXX. But not libproj13. Unfortunately I cannot find a source which explains how to install libproj13 or which libprojXX is linked to which proj. I have tested installing cdo on other VMs where libproj13 is present. There it works.
My question is:
How do I get libproj13 installed so that cdo runs?
The easiest option is to install CDO using conda (https://anaconda.org/conda-forge/cdo).
However, I have a set of bash scripts for installing CDO and dependencies from source. This will presumably solve your problems: https://github.com/r4ecology/nctoolkit/tree/master/cdo_installers

ERROR - Config value: 'theme'. Error: Unrecognised theme name:

The solution to similar issues on Github about this all point to installing MkDocs or the theme with a package manager and not pip. However, I have installed both with pip.
Installed MkDocs with pip (not a package manager)
Installed n number of MkDocs themes with pip
updated mkdocs.yaml to add:
theme:
name: '{name_of_theme}'
then
mkdocs serve
result
ERROR - Config value: 'theme'. Error: Unrecognised theme name: '{name_of_theme}'. The available installed themes are: mkdocs, readthedocs
What am I missing?
In your mkdocs.yaml, use:
theme:
name: mkdocs
or
theme:
name: readthedocs
Essentially, the name of a theme you actually installed.
Had the same problem with mkdocs-material. In my case this originated from a faulty installation of the theme. From the mkdocs-material FAQ:
Check if mkdoc is correctly installed: mkdocs --version. You should get the version and installed path back.
Check if the theme is correctly installed: mkdocs serve --help. You should get a list of parameters. Check this entry if you theme name appears:
-t, --theme [material|mkdocs|readthedocs] (in this case "material")
If your theme name is missing, try reinstalling it. In my case, I had used the python -m pip flag with mkdocs and needed to do the same with the theme:
python -m pip install mkdocs
python -m pip install mkdocs-material
It could be that you have another version of mkdocs globally installed. That was my case.
I have recently begun using nala, a wrapper for apt, the package manager for the Debian family of Linux (I'm using Pop!_OS, a variant of Ubuntu). And it has a requirement for mkdocs from the distribution's repos, which I just realized.
When I typed mkdocs in the terminal, the wrong copy would be launched - the one in /usr/bin (actually in /usr/lib/python3/dist-packages/ according to mkdocs --version) instead of the one in my virtual environment. It's curious, because the virtual environment's bin folder was supposed to have priority in the PATH.
I uninstalled nala, which removed the globally installed mkdocs, and of course that fixed the problem, but I really like nala. I reinstalled it, and after reinstallation, the problem did not return. (Which does not make much sense to me.)
Next time, I will try to deactivate my virtual environment, then reactivate it to see if it fixes the problem. Or else I could check the path for the locally installed mkdocs (from the virtual environment) with which -a mkdocs and use its full path.
I've never seen the yaml file with the extension ".yaml".
Have you tried changing it to ".yml", so it's "mkdocs.yml".
You can definitely install mkdocs and a theme with pip.

PHP Composer "require" OR condition with version in future

I need to use a bugfix which has not been released yet. Can I use something like:
"bower-asset/yii2-pjax": "2.0.6 | dev-master#18a9183d578d81fb9dbb1c604daba48815c3ebd5 as 2.0.5"
or
"bower-asset/yii2-pjax": "2.0.6 | dev-master as 2.0.5"
in my composer.json? Where 2.0.6 is the stable version in future and dev-master#hash is the commit including the bugfix, now available in remote repo (#master).
While trying to install this package, I discovered that it has a dependency (thanks to lichunqiang).
Here is how to install the dependency and the package:
composer require "fxp/composer-asset-plugin:~1.1.1"
composer require "bower-asset/yii2-pjax:dev-master"
For some reason, composer require "bower-asset/yii2-pjax:2.0.6" does not work, it seems that composer-asset-plugin, the Composer plugin which is used to install the Bower asset does not find any corresponding version.
The current version of Composer is broken, it returns this error:
[ErrorException]
Illegal offset type in isset or empty
You can get back to the old version by rolling back:
composer self-update --rollback

Yii2.0 installation is not working using composer

composer create-project --prefer-dist yiisoft/yii2-app-basic basic
The following is the ouput of above command
Installing yiisoft/yii2-app-basic (2.0.6)
- Installing yiisoft/yii2-app-basic (2.0.6)
Loading from cache
Created project in basic
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*#stable | 1.11.*#stable -> no matching package found.
- yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*#stable | 1.11.*#stable -> no matching package found.
- Installation request for yiisoft/yii2 >=2.0.5 -> satisfiable by yiisoft/yii2[2.0.5, 2.0.6].
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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Please, refer the installation guide. It seems that you are missing asset plugin:
composer global require "fxp/composer-asset-plugin:~1.2.0"
You should run composer clear-cache first before running
composer global require "fxp/composer-asset-plugin:~1.1.1"
This worked for me.