朱莉娅软件包安装失败,请通过已知的“名称= uuid”指定

时间:2019-12-12 08:13:16

标签: julia

尝试安装任何Julia软件包时出现错误:

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`.

该如何解决?

1 个答案:

答案 0 :(得分:2)

通过以下两个步骤,我可以解决此问题:

首先:(不确定是否绝对需要)

rm(joinpath(homedir(), ".julia", "registries"); recursive=true)

第二:安装错误消息中提到的软件包:

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

然后我的Pkg安装成功了:

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]