我正在尝试注册一个新的Julia包,但是Pkg.publish()
失败了。它说我需要拨打Pkg.update()
。后者告诉我一切都已经是最新的。
我在控制台中得到了什么:
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating RDF...
INFO: Computing changes...
INFO: No packages to install, update or remove.
julia> Pkg.register("RDF")
INFO: Registering RDF at git://github.com/joejimbo/RDF.jl.git
INFO: Committing METADATA for RDF
julia> Pkg.publish()
ERROR: METADATA is behind origin/metadata-v2 – run Pkg.update() before publishing
in publish at pkg/entry.jl:259
in anonymous at pkg/dir.jl:28
in cd at file.jl:22
in cd at pkg/dir.jl:28
in publish at pkg.jl:53
我该如何解决这个问题?
谢谢,
金
答案 0 :(得分:4)
解决方案:擦除Julia安装并删除~/.julia
。
我重新安装了Julia(这次是0.3rc1),它的工作原理如文档中所述。
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-rc1+60 (2014-07-17 19:50 UTC)
_/ |\__'_|_|_|\__'_| | Commit a327b47* (9 days old master)
|__/ | x86_64-apple-darwin13.3.0
julia> Pkg.init()
INFO: Initializing package repository /Users/jbaran/.julia/v0.3
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
julia> Pkg.clone("https://github.com/joejimbo/RDF.jl.git")
INFO: Cloning RDF from https://github.com/joejimbo/RDF.jl.git
INFO: Computing changes...
INFO: Cloning cache of URIParser from git://github.com/Keno/URIParser.jl.git
INFO: Installing URIParser v0.0.2
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating RDF...
INFO: Computing changes...
INFO: No packages to install, update or remove
julia> Pkg.register("RDF")
INFO: Registering RDF at git://github.com/joejimbo/RDF.jl.git
INFO: Committing METADATA for RDF
julia> Pkg.tag("RDF", :patch)
INFO: Tagging RDF v0.0.1
INFO: Committing METADATA for RDF
julia> Pkg.add("JSON")
INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
INFO: Installing JSON v0.3.7
INFO: Package database updated
INFO: METADATA is out-of-date — you may not have the latest version of JSON
INFO: Use `Pkg.update()` to get the latest versions of your packages
julia> Pkg.publish()
答案 1 :(得分:0)
请注意,从Julia 1.0 +开始,已从软件包管理器中删除了注册Julia软件包的工作流程。请参阅Readme for the Julia Registry for more info on registering a package。