Pkg.add("CustomGaussQuadrature") ERROR: Unsatisfiable requirements

Resolving package versions…
ERROR: Unsatisfiable requirements detected for package LinearAlgebra [37e2e46d]:
LinearAlgebra [37e2e46d] log:
├─possible versions are: 1.10.9 or uninstalled (package in sysimage!)
└─found to have no compatible versions left with CustomGaussQuadrature [443f1e71]
└─CustomGaussQuadrature [443f1e71] log:
├─possible versions are: 1.0.0 or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions: 1.0.0

What can I do to overcome this ERROR?

You likely want to loosen this line:

To something like this instead:

LinearAlgebra = "< 0.0.1, 1"

Which is what I recommend as the compat entry for most stdlibs, in most cases.

Many thanks for your help so far.

The Project.toml was organised automatically when I wrote my package CustomGaussQuadrature.

I also successfully submitted this package to Julia General Registry.

Doesn’t this submission to the Julia General Registry check that the Project.toml is OK?

Why do I need to make this change?

What does “compat entry for most stdlibs” mean?

All help greatly appreciated!

I can answer this question.

The submission (i.e. Registrator) reads Project.toml to find uuid, name, version, dependencies, and compat. It does very basic consistency checks on uuid, name, and version against the current registry.

The automerge for the General registry does some additional testing, including checking that all dependencies have bounded compat specifiers and that the package can be loaded. The latter check is limited to the version of Julia running automerge though, which is typically the latest released version.

So no, not all aspects of Project.toml are checked before a new package or a new version is merged to the General registry. There is certainly room for improvements, which will happen if volunteers implement better checks and make pull requests to the RegistryCI package.

1 Like

As you have suggested, I have used
LinearAlgebra = “<0.0.1, 1”
Printf = “<0.0.1, 1”

Nonetheless, when I try Pkg.add(“CustomGaussQuadrature”), I still get the following error message:

Resolving package versions…
ERROR: Unsatisfiable requirements detected for package Printf [de0858da]:
Printf [de0858da] log:
├─possible versions are: 1.10.9 or uninstalled (package in sysimage!)
└─found to have no compatible versions left with CustomGaussQuadrature [443f1e71]
└─CustomGaussQuadrature [443f1e71] log:
├─possible versions are: 1.0.0-1.0.1 or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions: 1.0.0-1.0.1

Could you please let me know how I can correct this error?

Works for me on Julia 1.10.9.

Possibly you tried that before your new version had propagated to the package servers, in which case it still tried to install the old version.

Many thanks for your help.

After Pkg.add(“CustomGaussQuadrature”) continued to result in the same error, I used the following commands:
juliaup update
followed by
Pkg.add(“CustomGaussQuadrature”)
Then it worked. However, this was for Julia v1.11.5

I then used
juliaup default 1.10.9
and I still had the same error with
Pkg.add(“CustomGaussQuadrature”)

I then installed Julia from scratch on another computer from the Julia website. It installed Julia v1.10.9 and
Pkg.add(“CustomGaussQuadrature”)
worked.

Maybe I should install v1.10.9 directly from the Julia website, instead of using juliaup?

The Julia installation method has no significance at all for this problem.

These lines

└─CustomGaussQuadrature [443f1e71] log:
├─possible versions are: 1.0.0-1.0.1 or uninstalled

indicate that you have outdated registry information which doesn’t know about versions 1.0.2 and 1.0.3.

That shouldn’t normally happen but you can try running

Pkg.Registry.update()

to see if it changes anything. If it doesn’t you can also try

Pkg.Registry.rm("General")
Pkg.Registry.add("General")

Pkg.Registry.update()
worked for me.