新人关于cita在mac上安装的问题

我是新人,第一次接触cita。在官方文档里找到 homebrew-cita的GitHub页面,按照上面的步骤安装cita,结果碰到如下的问题,有大佬解答下吗:

GitHub 上的文档有点问题,谢谢反馈!

如果用 brew install cita 安装, 请直接执行:

cita create --super_admin "0x141d051b1b1922bf686f5df8aad45cefbcb0b696" --nodes "127.0.0.1:4000,127.0.0.1:4001,127.0.0.1:4002,127.0.0.1:4003"

GitHub 上的文档已经修正:

谢谢!

解决了嘛,bro @Alvin_lu

cita help print 出来的有点出人意料 = =

理想情况下应该是这个样子:

 𝝺 brew tap cryptape/cita
 𝝺 brew install cita
==> Installing cita from cryptape/cita
==> Downloading https://github.com/cryptape/cita/releases/download/v0.24.0/cita_secp256k1_sha3.tar.gz
Already downloaded: /Users/mercury/Library/Caches/Homebrew/downloads/788d68811db6099adb3317d71e3d67053f190558d74895657d0cb71afe279cb3--cita_secp256k1_sha3.tar.gz
==> Cloning https://github.com/cryptape/cita.git
Updating /Users/mercury/Library/Caches/Homebrew/cita--cita--git
==> Checking out tag v0.24.0
HEAD is now at 1f10bc8 Merge pull request #599 from kaikai1024/bump-to-0.24.0
HEAD is now at 1f10bc8 Merge pull request #599 from kaikai1024/bump-to-0.24.0
Entering 'cita-bft'
Entering 'cita-forever'
Entering 'scripts/config_tool/genesis'
Entering 'scripts/contracts/interaction'
Entering 'scripts/contracts/tests/contracts'
Entering 'scripts/txtool/txtool/proto'
Entering 'tests/jsondata'
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/cita-bft
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/cita-forever
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/scripts/config_tool/genesis
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/scripts/contracts/interaction
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/scripts/contracts/tests/contracts
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/scripts/txtool/txtool/proto
/Users/mercury/Library/Caches/Homebrew/cita--cita--git/tests/jsondata
==> cp -r env.sh /usr/local/Cellar/cita/0.24.0/libexec/bin/cita-env
==> cp -r scripts/cita /usr/local/Cellar/cita/0.24.0/libexec/bin/cita
==> cp -r scripts/cita_config.sh /usr/local/Cellar/cita/0.24.0/libexec/bin/cita-config
==> Caveats
By default, binaries installed by cita will be placed into:

/usr/local/opt/cita/libexec

Usage: cita_commander <command> <node> [options]
where <command> is one of the following:
    { help | create | port | setup | start | stop | restart
      ping | top | backup | clean | logs | logrotate }
Run `cita help` for more detailed information.
happy hacking!
==> Summary
🍺  /usr/local/Cellar/cita/0.24.0: 217 files, 132.5MB, built in 14 seconds

 𝝺 cita help
Start docker container cita_run_container ...
c57d02a582ef069743ea104721afd41a540c25aff30977306138a17967be9484
Usage: cita <command> <node> [options]
This is the primary script for controlling the cita node.
 INFORMATIONAL COMMANDS
    help
        You are here.
 BUILDING COMMANDS
    create <config>
        Creates blockchains according to the following config,
        use "cita create -h" to get more information.
        "cita-config" has the same function.
    append <config>
        Append a node into an existed chain,
        use "cita append -h" to get more information.
        "cita-config" has the same function.
    port <ports>
        Sets docker port, for example: "cita port 1337:1337 1338:1338",
        expose docker port 1337 and 1338.
 SERVICE CONTROL COMMANDS
    setup <node>
        Ensuring the required runtime environment for cita node, like
        RabbitMQ service. You should run this command at the first time
        of running cita node.
    start <node>
        Starts the cita node in the background. If the node is already
        started, you will get the message "Node is already running!" If the
        node is not already running, no output will be given.
    stop <node> [debug] [mock]
        Stops the running cita node. Prints "ok" when successful.  When
        the node is already stopped or not responding, prints:
        "Node 'NODE_NAME' not responding to pings."
    restart <node>
        Stops and then starts the running cita node. Prints "ok"
        when successful.  When the node is already stopped or not
        responding, prints: "Node 'NODE_NAME' not responding to
        pings."
 DIAGNOSTIC COMMANDS
    ping <node>
        Checks that the cita node is running. Prints "pong" when
        successful.  When the node is stopped or not responding, prints:
        "Node 'NODE_NAME' not responding to pings."
    top <node>
        Prints services processes information similar
        to the information provided by the `top` command.
    stat <node> (deprecated, use 'top' instead)
    logs <node> <service>
        Fetch the logs of the specified service.
 SCRIPTING COMMANDS
    backup <node>
        Backup the node's data and logs into backup directory, which actually
        copy that data and logs into backup directory. Prints the specified
        backup commands. When the node is running, prints:
        "Node is already running!"
    clean <node>
        Clean the node's data and logs, which actually move that data and logs
        into backup directory. Prints the specified backup commands. When the
        node is running, prints: "Node is already running!"
    logrotate <node>
        Archives the current node logs, starts fresh logs. Prints the archived
        logs path.
 𝝺 

如果重新安装,记得重启 Docker,或者:

docker stop cita_run_container && docker rm cita_run_container
1赞

Sorry, 我没有注意看到:

realpath: command not found

的问题。

你需要在 macOS 下安装这个命令才行。执行:

brew install coreutils

参考:

同时在上次的分享中我也专门提到了这个问题,有兴趣可以回看这次分享:

1赞

好像解决了,链启动了,谢谢

刚刚执行了brew install coreutils,链启动了,非常感谢