julia not found in project, manifest or registry

julia 1.0.3 版本添加包的时候抛出异常.julia not found in project, manifest or registry

1
2
3
4
5
6
7
8
(v1.0) pkg> add https://github.com/JuliaIO/JSON.jl
Cloning git-repo `https://github.com/JuliaIO/JSON.jl`
Updating git-repo `https://github.com/JuliaIO/JSON.jl`
[ Info: Assigning UUID a4e475aa-2c49-59aa-8c9b-6b302a36b041 to JSON
Resolving package versions...
ERROR: The following package names could not be resolved:
* julia (not found in project, manifest or registry)
Please specify by known `name=uuid`.

添加JSON包的时候抛出这个错误,最终在julia论坛中发现这个问题的解决方法,这个是julia的一个bug。执行下面命令即可.

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

再次添加包即可.

参考