零基础学习以太坊开发-solidity开发环境安装

2018-09-14  本文已影响0人  jerry的技术与思维

介绍

Solidity是一种语法类似JavaScript的高级语言。前面已经用Solidity演示过智能合约代码。没错,Solidity是以太坊开发智能合约的推荐开发语言了。

Remix

如果您只想尝试的Solidity到底是什么鬼,可以尝试 不需要任何安装的Remix。如果要在不连接Internet的情况下使用它,可以访问 https://github.com/ethereum/browser-solidity/tree/gh-pages并按照该页面上的说明下载.ZIP文件。

安装

npm install solc  

TIP:在基于浏览器的Solidity上,Emscripten提供了一个跨平台JavaScript库,把C++源码编译为JavaScript,同时也提供NPM安装包。

  brew update
    brew install boost --c++11               # 这需要等待一段时间
    brew install cmake cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp 
    # 仅仅安装Mix IDE和Alethzero
    brew install xz d-bus
    brew install llvm --HEAD --with-clang 
    brew install qt5 --with-d-bus 
    #这里需要长时间的等待,可添加--verbose输出信息会让等待显得不那么长

    #如果你只准备安装solidity,忽略末尾Alethzero和Mix的错误。
    git clone --recursive https://github.com/ethereum/webthree-umbrella.git
    cd webthree-umbrella
    ./webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity 
    # 更新Solidity库
    ./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --all --cores 4 -DEVMJIT=0 
    # 编译Solidity及其它
    # 在OS X系统加上DEVMJIT将不能编译,在Linux系统上则没问题  

#Ubuntu 14.04
    sudo apt-add-repository ppa:george-edison55/cmake-3.x
    #加入其他包
    sudo apt-get -y update
    sudo apt-get -y install language-pack-en-base
    sudo dpkg-reconfigure locales
    sudo apt-get -y install software-properties-common
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo add-apt-repository -y ppa:ethereum/ethereum-dev
    sudo apt-get -y update
    sudo apt-get -y upgrade


    cd webthree-umbrella/solidity
    git remote add personal git@github.com:username/solidity.git

上一篇 下一篇

猜你喜欢

热点阅读