Hyperledger fabric环境搭建中遇到的问题 Mac

mac 搭建第一个区块链网络 fabric 1.0-beta 花了快两天才搭好第一个区块链网络,踩过很多坑,有慢慢找到解决办法的,也有推到重来的。现在进入正题。    1 安装过程 1.1 安装brew           Linux不同版本的系统中有很多在线安装工具,如yum,apt-get。brew是mac中很实用的工具。 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.... 阅读详情

1、node安装参考https://blog.youkuaiyun.com/CaptainJava/article/details/83866880

2、在搭建fabric IBM Marbles环境,在marbles/fabric-samples/fabcar下执行sudo npm install时node gyp安装报错

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1

但是一直在找这个报错,也没有解决。其实是找错问题了,gyp固然是安装失败了 但是失败的原因在这个报错的前边几句,

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

当时报错为: 

 ~/go/src/marbles/fabric-samples/fabcar  ➦ 94c21eb  sudo npm install
Password:

> grpc@1.14.2 install /Users/grootma/go/src/marbles/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
[grpc] Success: "/Users/grootma/go/src/marbles/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v48-darwin-x64-unknown/grpc_node.node" is installed via remote

> pkcs11js@1.0.16 install /Users/grootma/go/src/marbles/fabric-samples/fabcar/node_modules/pkcs11js
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Traceback (most recent call last):
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
    self.Pchify))
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
    archs = self.GetActiveArchs(self.configname)
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
    version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/bin/node" "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/grootma/go/src/marbles/fabric-samples/fabcar/node_modules/pkcs11js
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
fabcar@1.0.0 /Users/grootma/go/src/marbles/fabric-samples/fabcar
└── (empty)

npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN fabcar@1.0.0 No repository field.
npm ERR! Darwin 18.2.0
npm ERR! argv "/usr/local/Cellar/nvm/0.33.11/versions/node/v6.11.1/bin/node" "/usr/local/opt/nvm/versions/node/v6.11.1/bin/npm" "install"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! pkcs11js@1.0.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.16 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pkcs11js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pkcs11js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pkcs11js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/grootma/go/src/marbles/fabric-samples/fabcar/npm-debug.log
npm ERR! code 1

是xcode 命令行工具的问题,在这我们重新设置一下xcode路径就好了(后边路径要去确认一下自己的xcode路径)

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

注意:当时设置完了,接着执行npm install时报错了 新的错误,

 /Applications/Xcode.app/Contents/Developer  sudo npm install
npm WARN enoent ENOENT: no such file or directory, open '/Applications/Xcode.app/Contents/Developer/package.json'
npm WARN Developer No description
npm WARN Developer No repository field.
npm WARN Developer No README data
npm WARN Developer No license field.

当时正好有事情就所有然见关掉,关机了,第二天打开电脑重新进行sudo npm install的时候结果成功了。没有在报错。所以肯呢个需要重启一下某些工具或者xcode。具体不清楚,反正我是重启电脑后就好了。。。如果有更好的解释或者更好的方法希望留言告知。

3、node install_chaincode.js 出现 Error('Cannot find org.', orgName):

root@xg:/opt/gopath/src/github.com/hyperledger/marbles/scripts# node install_chaincode.js 
info: Loaded config file /opt/gopath/src/github.com/hyperledger/marbles/config/marbles_local.json
info: Loaded connection profile file /opt/gopath/src/github.com/hyperledger/marbles/config/connection_profile_local.json

Connection Profile Lib Functions:()
......
  getAdminSignedCertPEM()
---------------------------------------
info: Lets install some chaincode - marbles v4
---------------------------------------
info: First we enroll
/opt/gopath/src/github.com/hyperledger/marbles/utils/connection_profile_lib/parts/org.js:102
        throw new Error('Cannot find org.', orgName);
        ^
Error: Cannot find org.

该问题是由于 marbles\config\connection_profile_local.json中的 hfc-key-store 的绝对路径不正确导致的,需要更改是实际路径

(解决方法参考的:https://blog.youkuaiyun.com/u011127242/article/details/83450015)

将/Users/grootma/go/src/marbles/config/connection_profile_local.json文件中,三处"path"的值替换为Marble项目所在的绝对路径,只改前半部分后边不改动。即可。

4、在启动marbles服务,gulp marbles_local时报错

error: [Client.js]: Failed to load user "admin" from local key value store. Error: Error: Private key missing from key store. Can not establish the signing identity for user admin

错误,没找到admin用户的私钥,

将/Users/grootma/go/src/marbles/fabric-samples/fabcar/hfc-key-store文件夹下的文件复制到~/.hfc-key-store下,再次启动即可。

Hyperledger Fabric/Fabric-samples 安装及使用(Mac) 1.清单 brew Git cUrl docker docker-compose GoLang 2.开始安装 2.1 Git mac自带git,也可自行安装:brew install git 2.2 curl brew install curl 2.3 docker brew install docker 2.4 docker-compose 无需操作,docker安装完成后,也含有了docker-compose 以上安装细节也可自行百度,网上都有^.^ 2.5 GoLang 1& 阅读详情

相关推荐

Mac Pro下部署Hyperledger Fabric 1.4.4

主要参考网址: https://www.jianshu.com/p/cd05e966a6a8 https://hyperledgercn.github.io/hyperledgerDocs/getting_started/ https://www.cnblogs.com/zongmin/p/11635686.html#autoid-0-3-1 https://www.jianshu.com...

yuxinqingge的博客 2176

关于 node-pre-gyp install --fallback-to-build 的解决办法

百度说是由于node源的问题,但笔者本身就是tb源。然后再重新跑一遍上面流程就可以了。今天刚开工,发现项目不能运行了。然后重新npm install。

全栈小菜鸟 6654

hyperledger fabric 源码调试(orderer)环境搭建教程

###前言 ​ 接触hyperledger fabric有一段时间了,看文档搭集群写链码都做过,但要深入理解还是通过源码比较直观,遂决定部署起来。同多机器部署一样,官文对源码调试的描述较少,网上有些前辈已经写过但少有明确每一步的原因,本系列文尝试依据个人理解来描述构建fabric源码调试环境的步骤,去掉docker这层障碍,并给出思考过程。 ​ 之前有写过一篇hyperledger fabric ...

beijihukk的博客 1733

`node-pre-gyp install --fallback-to-build`的解决办法

npm install -g node-gyp //windows sudo npm install -g node-gyp //linux

小码的博客 1万+

GD32F103入门实践(一)配置环境,搭建工程模板,烧写程序

写在前面 本系列博客是我初学GD32F103的操作实录,我个人是个小白,在学习过程中真的也遇到了不少坑,因此我希望能记录下来,帮助到同样踩坑的你。 我的芯片是GD32F103ZE,软件是Keil,烧写用的是JLink。 材料准备 首先我在兆易创新官网(兆易创新),下载相关的文件。点击资料下载,在搜索框里输入“GD32F10”可以得到相关的资料,其他芯片类似。比较重要的是GD32F10x AddOn和GD32F10x Firmware Library(固件库),这两个必须下载。 下载Keil MDK5,这

qq_41208487的博客 3万+

生成式引擎优化(GEO)的概念与技术路径

生成式引擎优化(GEO)是针对生成式AI引擎的新型优化策略,旨在提升内容在AI搜索与问答平台中的可见性和可信度。与传统SEO相比,GEO更注重语义理解、知识图谱和多模态生成等技术,通过优化内容的结构化和平台适配性,使品牌信息在生成式AI中更易被采纳和呈现。其核心技术包括语义理解、向量数据库和实时反馈优化等,应用于品牌传播、智能客服和个性化推荐等领域。随着AI技术发展,GEO将向智能化、自动化方向演进,成为内容优化的重要工具。

Baixue5209的博客 1047

bcrypt 安装错误

Error npm ERR! code ELIFECYCLE npm ERR! errno 9009 npm ERR! bcrypt@5.0.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 9009 npm ERR! npm ERR! Failed at the bcrypt@5.0.0 install script. npm ERR! This is probably not a problem wi

qq_36965962的博客 1239

DeepMD-kit描述子机制解析:从原子坐标到不变性特征

本文深入解析DeepMD-kit描述子机制,详细阐述如何将原子坐标转换为具有平移、旋转和排列不变性的特征表示。探讨了se_e2_a、se_e3等不同描述子的适用场景及性能优化技巧,帮助读者掌握这一关键技术在分子模拟中的应用实践。

weixin_42520661的博客 340

解决node-pre-gyp install --fallback-to-build 卡住不动

一般是因为需要下载国外的包,要么连VPN,要么使用淘宝的镜像: 使用cnpm: npm install -g cnpm --registry=https://registry.npm.taobao.org 然后用下面命令安装package.json: cnpm install

u011250186的博客 1万+

FPGA以太网接口设计避坑指南:GMII与RGMII时序转换的三种实现方案对比

本文深入解析FPGA以太网接口设计中GMII与RGMII时序转换的三种实现方案,包括Xilinx官方IP核、手工原语逻辑和开源方案gmii_to_rgmii。通过对比分析各方案的优缺点和适用场景,为工程师提供技术选型指南,帮助避免常见设计陷阱,提升高速网络设备开发的效率和可靠性。

weixin_42570484的博客 384

告别手动改图!用Python+PyWin32驱动SolidWorks,实现参数自动化修改(保姆级避坑指南)

本文详细介绍了如何利用Python和PyWin32驱动SolidWorks实现参数自动化修改,提供从环境配置到API连接的工业级解决方案。通过实战案例和避坑指南,帮助工程师高效搭建自动化脚本工作流,显著提升设计效率。

weixin_30614109的博客 742

node.js错误 --> node-pre-gyp install --fallback-to-build

错误:node-pre-gyp install --fallback-to-build 问题描述:在安装ghost博客的时候需要使用node.js,但是在执行sudo npm install --production的时候报了这个错误 接着百度,看到https://github.com/node-inspector/v8-debug/issues/7github有同样问题了 我就选了一种试试...

Hitvz的博客 4万+

强化学习 | Multi Agents | Trust Region | HATRPO | HAPPO

ICLR2022多智能体论文,将trust region推广到MA上,保证单调递增。学习博客,共7k字,纯手敲。含大量手写笔记。

111辄的博客 1万+

Hyperledger Fabric v2.2.x 搭建记录

fabricv2.2版本,bootstrap.sh文件,fabric安装问题,Ubuntu图标消失,Ubuntu设置消失,Ubuntu阿里源

weixin_43050394的博客 484

汽水音乐自动化薅羊毛教程:从零搭建稳定赚钱脚本

📖 前言:为什么要学习自动化脚本?在数字时代,时间就是金钱。汽水音乐等App通过观看广告奖励用户金币的模式,本质上是将我们的时间转化为收益。本教程将教你如何用Python自动化这个过程,让程序为你"打工",实现被动收入。通过本教程,你将学到:移动端自动化测试的核心技术Python在自动化领域的实际应用如何将重复性任务转化为自动化流程创造属于自己的"数字员工"第一章:环境准备与基础配置1.1 硬件要求Android手机一部(建议使用备用机)USB数据线。

weixin_44947827的博客 5787

海洋CMS admin_notify.php 远程代码执行漏洞复现(CVE-2024-30565)

海洋CMS admin_notify.php 接口处存在远程代码执行漏洞,经过身份验证的远程攻击者可利用该漏洞执行任意代码,写入后门文件,进而控制整个web服务器。

0xSec 2714

Mac OS 区块链hyperledger环境搭建、环境架构介绍、环境如何用、部署 Chaincode、智能合约的调用

1. 环境搭建 Install Common Packages # install utilities $ brew install unzip $ brew install git $ brew install curl $ brew install wget $ brew install vim $ brew install tree $ brew install jq # install gradle $ cd /tmp && wget https://services.gra

AI架构师易筋 1263

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

安装fabric运行环境的时候Vagrant up遇到的问题,解决路径

解决方法来自: https://my.oschina.net/wtsoftware/blog/789164 搭建方法主要参考http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv/的英文文档说明,和另一篇windows下的文章(http://8btc.com/article-3815-1.html)在mac

l18710006370的博客 2358

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

STM32驱动HX711与OLED的底层时序协同实战

称重系统本质是模拟前端(HX711)、显示后端(OLED)与主控(STM32)之间的精密时序协同。HX711采用脉冲同步串行输出而非标准ADC,需微秒级SCK控制与DOUT外部中断配合;OLED(SSD1306)依赖严格初始化指令序列和页模式显存写入,SPI时序容错率极低。二者共同对STM32提出实时调度要求:不能依赖HAL_Delay或轮询,必须通过中断+状态机+寄存器级操作保障确定性。这种硬件协议层深度适配,是嵌入式系统稳定运行的基础能力,广泛应用于电子秤、工业传感器节点、IoT终端等需要高精度模拟采集

weixin_34059951的博客 525

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

【Fabric2.2.1搭建】过程及遇到的问题

Fabric2.2.1搭建搭建过程问题 搭建过程 在搭建过程中主要参考了两篇:①https://blog.youkuaiyun.com/glclh/article/details/108184471 这一篇操作讲的很细致,但是是1.4.0版的,我先是按着这个直接把版本号替换了,但是后面发现1.4.0和2.2.1在后续配置上有差别,就按照下面那篇了 ②https://blog.youkuaiyun.com/qq_43681877/article/details/110896678 问题 搭好环境后遇到了一下操作问题: ./netw

Moooonk的博客 8997

零基础入门指南:如何快速搭建build-blockchain-insurance-app本地开发环境

build-blockchain-insurance-app是一个基于Hyperledger Fabric的区块链保险应用示例,它展示了如何利用区块链技术处理保险理赔流程,涉及保险公司、警方、维修店和商店等多个参与方。本文将为你提供一个全面且简单的指南,帮助你快速搭建该项目的本地开发环境。 ## 了解项目架构 在开始搭建开发环境之前,让我们先了解一下build-blockchain-insur

gitblog_00201的博客 597

signature=bccf140f21d086e4f6b17e01edbac3a0,超级账本搭建流程fabric-sample first-network

超级账本搭建流程(全)参考:环境准备安装必要程序此安装流程仅介绍MAC系统,其他系统略有差别,请自行查看参考链接超级账本教程。- 执行如下命令:1. cd ~2. vi .bashrc3. 添加如下语句```export GOROOT=/usr/local/goexport GOPATH=$HOME/goexport PATH=$PATH:$GOROOT/bin:$GOPATH/bin```4. ...

weixin_32375369的博客 476

mac 的 hyperledger fabric 2.X 搭建

写在前面,目前fabric官网文档教程已经比较完善了,不过搭建教程依旧不太完善,而且是英文,因此写下此篇分享给大家 一、环境准备 安装git brew install git 安装vim brew install vim 安装curl brew install curl 安装wget brew install wget 安装go1.14 以及以上版本 安装docker 17.06.2-ce 以及以上版本 安装docker-compose 1.14.0 以及以上版本 git 拉下 fabric 项目

smallone233的博客 1119

Hyperledger fabric mac环境搭建

文档 安装cURL 安装docker and docker compose 下载docker 安装docker 测试docker 安装Homebrew 官网 安装命令 Go programming Language Node.js Runtime and NPM ...

//柏拉图的双斜杠 641

mac 安装 hyperledger fabric开发环境

参考文章https://www.jianshu.com/p/8beb3a355f990、安装docker0.1、安装gobrew install go1、go 的环境设置添加$GOPATH环境变量,在~/.bash_profile中添加:export GOPATH=/Users/frank/goexport PATH=$PATH:$GOPATH/bin2、建立 go 源码目录结构(必须要做,否则后...

frankxixu的专栏 2243

hyperledger fabric Mac环境配置

Step:官网文档 :https://hyperledger-fabric.readthedocs.io/en/latest/releases.html 1、安装docker for mac  2、安装cURL,  mac 环境中已经安装了cURL 3、安装docker and docker compose 4、安装Homebrew 官网: https://brew.sh/index_zh...

qq_41390321的博客 804
上一篇: Mac 通过安装node、nvm、nrm、yarn;macOS 13
下一篇: ITerm2+sshpass远程登录记住密码mac
grootblockchain
博客等级 码龄11年 55粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值