Dep init не работает, даже если пакет существует - PullRequest
0 голосов
/ 11 сентября 2018

Я пытаюсь упаковать приложение go, используя dep, и при выполнении dep init возникает ошибка ниже.

Я установил библиотеку amcl отсюда - https://github.com/milagro-crypto/amcl/tree/master/version3/go

Даже существуют следующие пакеты

nithin@XPS-L401X:~/go/src/github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN$ ls
ARCH.go  BIG.go  DBIG.go  ECDH.go  ECP2.go  ECP.go  FP12.go  FP2.go  FP4.go  FP.go  MPIN.go  PAIR.go  ROM.go

Но все равно я получаю следующую ошибку

init failed: unable to solve the dependency graph: Solving failure: No versions of github.com/milagro-crypto/amcl met constraints:
    281d0829b307c911bb2f14f2fedc414a257cb8c8: Could not introduce github.com/milagro-crypto/amcl@281d0829b307c911bb2f14f2fedc414a257cb8c8 due to multiple problematic subpackages:
    Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)  Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)
    master: Could not introduce github.com/milagro-crypto/amcl@master due to multiple problematic subpackages:
    Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)  Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)
    add-js-tests: Could not introduce github.com/milagro-crypto/amcl@add-js-tests due to multiple problematic subpackages:
    Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)  Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)
    fix-retval: Could not introduce github.com/milagro-crypto/amcl@fix-retval due to multiple problematic subpackages:
    Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)  Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)
    milagro-crypto-c: Could not introduce github.com/milagro-crypto/amcl@milagro-crypto-c due to multiple problematic subpackages:
    Subpackage github.com/milagro-crypto/amcl/version3/go/amcl/FP256BN is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)  Subpackage github.com/milagro-crypto/amcl/version3/go/amcl is missing. (Package is required by github.com/hyperledger/fabric@release-1.1.)

1 Ответ

0 голосов
/ 16 ноября 2018

Я нашел ответ.

Сначала go get github.com/milagro-crypto/amcl

Затем cd в это место (на основе вашего $GOPATH) github.com/milagro-crypto/amcl/version3/go

Следуйте этомуинструкция по установке milagro
https://github.com/milagro-crypto/amcl/tree/master/version3/go

Я рекомендую устанавливать все опции один за другим, а затем не забудьте

go run TestALL.go

и

go run BenchtestALL.go

иначе не удается разрешить, IDK почему.

...