Cargo build error: failed to fetch `https://github.com/rust-lang/crates.io-index`
Author: subterfugueCreated Sep 1, 2020Updated Sep 2, 2020
Xi-Editor Issue Template
- I have searched existing issues and could not find my issue.
- I have studied the documentation.
Details
If your issue is a build or runtime error, please include the following:
- OS / platform (e.g. macOS 10.13.2) Ubuntu 19.10
- rust compiler version (
rustc --version) (we test against the latest stable release) 1.45.2 - rust compiler installation method (e.g. rustup, homebrew, source)
Using this command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - the frontend you're using, if applicable None
- the commit you're on, if building from source (
#3a2405b) Latest in main branch - a full backtrace or error message, if available
warning: /home/mon/github/xi-editor/rust/Cargo.toml: unused manifest key: package.rust
error: failed to resolve patches for https://github.com/rust-lang/crates.io-index
Caused by:
failed to load source for dependency onig
Caused by:
Unable to update https://github.com/kornelski/rust-onig?branch=bindgen#3c40d564
Caused by:
the given reference name 'refs/heads/.l2s.bindgen.lock0001' is not valid; class=Reference (4)Expected vs Actual
Expected xi-editor to build without errors.
$ cd xi-editor/rust && cargo build
# Successfuly builds xiActual: Cargo fails with the error message:
$ cargo build # in xi-editor/rust
warning: /home/mon/github/xi-editor/rust/Cargo.toml: unused manifest key: package.rust
error: failed to resolve patches for https://github.com/rust-lang/crates.io-index
Caused by:
failed to load source for dependency onig
Caused by:
Unable to update https://github.com/kornelski/rust-onig?branch=bindgen#3c40d564
Caused by:
the given reference name 'refs/heads/.l2s.bindgen.lock0001' is not valid; class=Reference (4)Source: xi-editor/xi-editor