Julia package install fail with Please specify by known `name=uuid` - julia

I have an error when trying to install any Julia package:
Pkg.add("Combinatorics")
Cloning default registries into `~/.julia`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
Added registry `General` to `~/.julia/registries/General`
Resolving package versions...
ERROR: The following package names could not be resolved:
* Logging (56ddb016-857b-54e1-b83d-db4d58db5568 in manifest but not in project)
Please specify by known `name=uuid`.
What can be done to fix this?

I could fix this problem after the following two steps:
First: (not sure if absolutely needed)
rm(joinpath(homedir(), ".julia", "registries"); recursive=true)
Second: installing the package mentioned as missing in the error message:
Pkg.add("Logging")
Resolving package versions...
Installed MappedArrays ─────────── v0.2.2
Installed IntervalSets ─────────── v0.3.2
Installed PDMats ───────────────── v0.9.10
Installed ColorVectorSpace ─────── v0.7.1
etc
Then my Pkg install worked:
Pkg.add("Combinatorics")
Resolving package versions...
Installed Polynomials ─ v0.6.0
Updating `~/.julia/environments/v1.1/Project.toml`
[861a8166] + Combinatorics v1.0.0
Updating `~/.julia/environments/v1.1/Manifest.toml`
[861a8166] + Combinatorics v1.0.0
[f27b6e38] + Polynomials v0.6.0
julia> using Combinatorics
[ Info: Precompiling Combinatorics [861a8166-3701-5b0c-9a16-15d98fcdc6aa]

Related

package.version mismatch

I am trying to solve this issue.
I understand that my version of the package is outdated (v1.7.2).
However, the package manager thinks I'm on the up-to-date version (v2.3.1).
(#v1.7) pkg> up
Updating registry at `~/.julia/registries/General.toml`
No Changes to `~/.julia/environments/v1.7/Project.toml`
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
(#v1.7) pkg> st Parsers
Status `~/.julia/environments/v1.7/Project.toml`
[69de0a69] Parsers v2.3.1
julia> using Parsers
julia> Parsers.VERSION
v"1.7.2"
If I uninstall/reinstall the problem is still there:
(#v1.7) pkg> rm Parsers
Updating `~/.julia/environments/v1.7/Project.toml`
[69de0a69] - Parsers v2.3.1
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
julia> using Parsers
│ Package Parsers not found, but a package named Parsers is available from a registry.
│ Install package?
│ (#v1.7) pkg> add Parsers
└ (y/n) [y]: y
Resolving package versions...
Updating `~/.julia/environments/v1.7/Project.toml`
[69de0a69] + Parsers v2.3.1
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
julia> using Parsers
julia> Parsers.VERSION
v"1.7.2"
PackageName.VERSION, in contrast to what it intuitively looks like, does not give you the version of the package - it gives you the version of Julia currently installed. So v"1.7.2" refers to your installed version of Julia - you can verify this by loading any other package and trying LoadedPackage.VERSION on them, which should return the same value. (I'm not sure about the reason for such a design - having VERSION be a member of every module - but perhaps there's some value in VERSION being available as a local name within every module namespace.)
So you do have version 2.3.1 of Parsers installed, as the package manager indicates. The source of your original problem must be something else - perhaps it's worth asking as a separate question.

Unable to installl Xamarin.Azure.NotificationHub.Android nuget to existing project

I got the following error when I was trying to install Xamarin.Azure.NotificationHub.Android nuget package to my existing xamarin.forms project.
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.AndroidX.Lifecycle.LiveData (>= 2.1.0)', 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.Google.Android.Material (>= 1.0.0)', 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.AndroidX.Legacy.Support.V4 (>= 1.0.0)', 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.AndroidX.Browser (>= 1.0.0)'
Unable to find a version of 'Xamarin.Android.Arch.Core.Common' that is compatible with 'Xamarin.Android.Arch.Core.Runtime 1.1.1.3 constraint: Xamarin.Android.Arch.Core.Common (= 1.1.1.3)', 'Xamarin.Android.Arch.Lifecycle.LiveData 1.1.1.3 constraint: Xamarin.Android.Arch.Core.Common (= 1.1.1.3)', 'Xamarin.Android.Arch.Lifecycle.LiveData.Core 1.1.1.3 constraint: Xamarin.Android.Arch.Core.Common (= 1.1.1.3)'.
But my project already has Xamarin.Android.Arch.*** 1.1.1.3 installed.
I had no issue when installing Xamarin.Azure.NotificationHub.Android nuget to a fresh project. The error occurs when installing to one my existing Xamarin.Forms project which already uses AppCenter.
Is this because of some package dependency conflict? If so, how to resolve it?
Xamarin.Azure.NotificationHub.Android (1.1.1) package uses Xamarin.GooglePlayServices.Base (>= 70.x.x) and Xamarin.Firebase.Messaging (>= 70.x.x) as dependencies. One of the packages installed on the project also depends on Xamarin.GooglePlayServices.Base package. Xamarin.Azure.NotificationHub.Android (1.1.1) package needs a higher version of GooglePlayservices.Base (>= 70.x.x)package. Since my project uses a package.config file to manage installed packages, the existing package already installed a lower version of GooglePlayservices.Base package (60.x.x).
I was able to resolve this issue in 2 ways:
Uninstall the package which creates the conflict with all its dependencies. Then reinstall the package with setting Dependency Behavior as Lowest. Then I was able to install NotificationHub.Android package without any errors.
Migrate from package.config to new PackageReference format. In this way, it's easier to see what are the packages directly installed on the project and don't have to worry about dependencies. This also shows which packages create the conflict. Fixed the issue as the error log suggested.
NU1107: Version conflict detected for Xamarin.GooglePlayServices.Basement. Install/reference Xamarin.GooglePlayServices.Basement 71.1620.4 directly to project XXX to resolve this issue.
XXX -> Xamarin.Azure.NotificationHubs.Android 1.1.1 -> Xamarin.Firebase.Messaging 71.1740.4 -> Xamarin.GooglePlayServices.Basement (>= 71.1620.4)

Julia pkg> add results in "no known versions" errors for "Flux" and "Plots"

I am using Julia version 1.5.1 on a Win10 operating system. Trying to add Plots and Flux results in the errors listed below:
(#v1.5) pkg> add Plots
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Contour [d38c429a]:
Contour [d38c429a] log:
├─Contour [d38c429a] has no known versions!
└─found to have no compatible versions left with Plots [91a5bcdd]
└─Plots [91a5bcdd] log:
├─possible versions are: [0.12.1-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.6, 0.21.0, 0.22.0-0.22.5, 0.23.0-0.23.2, 0.24.0, 0.25.0-0.25.3, 0.26.0-0.26.3, 0.27.0-0.27.1, 0.28.0-0.28.4, 0.29.0-0.29.9, 1.0.0-1.0.14, 1.1.0-1.1.4, 1.2.0-1.2.6, 1.3.0-1.3.7, 1.4.0-1.4.4, 1.5.0-1.5.9, 1.6.0-1.6.3] or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions [0.12.1-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.6, 0.21.0, 0.22.0-0.22.5, 0.23.0-0.23.2, 0.24.0, 0.25.0-0.25.3, 0.26.0-0.26.3, 0.27.0-0.27.1, 0.28.0-0.28.4, 0.29.0-0.29.9, 1.0.0-1.0.14, 1.1.0-1.1.4, 1.2.0-1.2.6, 1.3.0-1.3.7, 1.4.0-1.4.4, 1.5.0-1.5.9, 1.6.0-1.6.3]
(#v1.5) pkg> add Flux
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Flux [587475ba]:
Flux [587475ba] log:
├─Flux [587475ba] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
I have tried the pkg> update and pkg> gc commands as well, but that did not identify any changes.
The pkg> status yields
(#v1.5) pkg> status
Status `~\.julia\environments\v1.5\Project.toml`
[c3e4b0f8] Pluto v0.11.14
Any suggestions on how to resolve this?

How can I use an unregistered package in Julia?

I want to use a package I found online, but I get the following error:
(Example) pkg> add Unregistered
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: The following package names could not be resolved:
* Unregistered (not found in project, manifest or registry)
Please specify by known `name=uuid`.
I have seen others use the add command, but it does not seem to work in this case.
To add an unregistered package, refer to it by URL:
(Example) pkg> add https://github.com/00vareladavid/Unregistered.jl
Updating git-repo `https://github.com/00vareladavid/Unregistered.jl`
Updating git-repo `https://github.com/00vareladavid/Unregistered.jl`
Resolving package versions...
Updating `~/.julia/environments/Example/Project.toml`
[dcb67f36] + Unregistered v0.2.0 #master (https://github.com/00vareladavid/Unregistered.jl)
Updating `~/.julia/environments/Example/Manifest.toml`
[7876af07] + Example v0.5.3
[dcb67f36] + Unregistered v0.2.0 #master (https://github.com/00vareladavid/Unregistered.jl)
Pkg will automatically install its dependencies.
After you have added the package, you can use it normally:
julia> import Unregistered
[ Info: Precompiling Unregistered [dcb67f36-efa0-11e8-0cef-2fc465ed98ae]
Note: Packages must have a toplevel Project.toml file with name, UUID, and version fields.

Julia does not update its packages

I installed DifferentialEquations by using:
Pkg.add("DifferentialEquations")
Then I used the below line to check the version:
Pkg.status("DifferentialEquations")
It returns 1.0.0 while, it must be 4.0.0.
I tried Pkg.update() or Pkg.update("DifferentialEquations). However, the version is still 1.0.0 and re-installing Julia did not help neither.
What can be done to update the DifferentialEqautions package?
The version of Julia is 0.6.2.
Edit
This time I not only uninstalled Julia, but I also deleted its folder in appdata. After installing Julia again and adding the package, now it is up to date.
Have you tried :
Pkg.pin("DifferentialEquations",v"4.0.0")
You can force Pkg to find a solution by giving an explicit version.
For example, going from version 5 to version 6 of the DifferentialEquations package:
(TestProject) pkg> status
Status `/tmp/TestProject/Project.toml`
[0c46a032] DifferentialEquations v5.0.0
(TestProject) pkg> add DifferentialEquations#6.0.0
Resolving package versions...
Updating `/tmp/TestProject/Project.toml`
[0c46a032] ↑ DifferentialEquations v5.0.0 ⇒ v6.0.0
Updating `/tmp/TestProject/Manifest.toml`
[1520ce14] - AbstractTrees v0.2.1
[79e6a3ab] - Adapt v1.0.0
[4fba245c] ↓ ArrayInterface v2.3.1 ⇒ v0.1.1
[9e28174c] - BinDeps v1.0.0
...
(TestProject) pkg> status
Status `/tmp/TestProject/Project.toml`
[0c46a032] DifferentialEquations v6.0.0
The equivalent API syntax:
julia> import Pkg
julia> Pkg.add(Pkg.PackageSpec(; name="DifferentialEquations", version=v"6.0.0"))

Resources