Home:ALL Converter>Cannot add a new package on julia

Cannot add a new package on julia

Ask Time:2016-05-18T03:30:09         Author:zwlayer

Json Formatter

I'm trying to add a new package on Julia. The name of the package is DataFrames.jl. To add this package, I've run the julia, and simply type Pkg.add("DataFrames"). Unfortunately, when I do that, I got the following errors:

julia> Pkg.add("DataFrames")
error: bad index file sha1 signature
fatal: index file corrupt
ERROR: failed process: Process(`git --work-tree=~/theuserxxx/.julia/v0.4/METADATA --git-dir=~/theuserxxx/.julia/v0.4/METADATA/.git update-index -q --really-refresh`, ProcessExited(128)) [128]
 in run at ./process.jl:531
 in success at pkg/git.jl:30
 in add at pkg/entry.jl:54
 in add at pkg/entry.jl:73
 in anonymous at pkg/dir.jl:31
 in cd at file.jl:22
 in cd at pkg/dir.jl:31
 in add at pkg.jl:23

Morever, whenever I tried to update a existing package, I also get the same errors:

julia> Pkg.update()
INFO: Updating METADATA...
error: bad index file sha1 signature
fatal: index file corrupt
ERROR: failed process: Process(`git pull --rebase -q`, ProcessExited(128)) [128]
 in pipeline_error at process.jl:555
 in run at process.jl:531
 in anonymous at pkg/entry.jl:283
 in withenv at env.jl:160
 in anonymous at pkg/entry.jl:282
 in cd at ./file.jl:22
 in update at ./pkg/entry.jl:272
 in anonymous at pkg/dir.jl:31
 in cd at file.jl:22
 in cd at pkg/dir.jl:31
 in update at ./pkg.jl:45

Is there anyone who can help me to solve this problem? Currently, I'm using julia 0.4.5 but this problem started before I moved to 0.4.5.

Author:zwlayer,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/37284781/cannot-add-a-new-package-on-julia
yy