doumei2023 2019-06-24 05:54
浏览 201

无法从源代码安装Go-Ipfs

I'm trying to Build IPFS from Source on windows 10.

Previously i installed it from source.It was working fine. But i needed the latest source so i started again from the scratch. because i edited some parts in the source.

I followed instructions on https://github.com/ipfs/go-ipfs/blob/master/docs/windows.md.

I received following error on executing following commands.

code

cd %GOPATH%\src\github.com\ipfs\go-ipfs
make install

Error

go version go1.12.6 windows/amd64
bin/check_go_version 1.12
go install  -asmflags=all=-trimpath="D:\GO_WORKSPACE" -gcflags=all=-trimpath="D:\GO_WORKSPACE" -ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=810cb607e-dirty" ./cmd/ipfs
# github.com/ipfs/go-ipfs/plugin/loader
plugin\loader\preload.go:11:2: undefined: pluginipldgit
plugin\loader\preload.go:12:2: undefined: pluginbadgerds
plugin\loader\preload.go:13:2: undefined: pluginflatfs
plugin\loader\preload.go:14:2: undefined: pluginlevelds
make: *** [cmd/ipfs/Rules.mk:37: cmd/ipfs-install] Error 2

I tried Adding this plugins in to preload.go file under src\github.com\ipfs\go-ipfs\plugin\loader directory.

exisiting code on preload.go.

import (
    "github.com/ipfs/go-ipfs/plugin"
)

i added after the issue

import (
    "github.com/ipfs/go-ipfs/plugin"
    pluginipldgit "github.com/ipfs/go-ipfs/plugin/plugins/git"
    pluginbadgerds "github.com/ipfs/go-ipfs/plugin/plugins/git"
    pluginflatfs "github.com/ipfs/go-ipfs/plugin/plugins/git"
    pluginlevelds "github.com/ipfs/go-ipfs/plugin/plugins/git"
)

so after i added this lines result is success.

Executed command

make install

Result

go version go1.12.6 windows/amd64
bin/check_go_version 1.12
go install  -asmflags=all=-trimpath="D:\GO_WORKSPACE" -gcflags=all=-trimpath="D:\GO_WORKSPACE" -ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=810cb607e-dirty" ./cmd/ipfs

Then i tried to start the ipfs using following command

ipfs daemon

Error

Initializing daemon...
go-ipfs version: 0.4.22-dev-810cb607e-dirty
Repo version: 7
System version: amd64/windows
Golang version: go1.12.6

Error: unknown datastore type: flatfs

Can someone help me configure the IPFS from source. Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dongshubang7816 2019-06-25 19:29
    关注

    I solved this problem by following method. not sure this will be a good solution or not. any way i could solve the issue.

    I'm posting this as a answer. so it will be useful to everyone who has the same issue.

    1) Deleted go-ipfs folder inside the "%GO_WORKSPACE% / .... / ipfs" folder.

    2) Git clone the go ipfs repo manually on the same location.

    3) go inside go-ipfs folder.

    4) execute install command.

    make install
    
    评论

报告相同问题?

悬赏问题

  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数