Ubuntu 12.04 LTS安装ethereum开发环境问题解决

提示:

如果遇到到了下面错误,并且版本是Ubuntu12.04 LTS,为了节省您的时间,不要继续看了,直接升级到Ubuntu14.04 LTS及以上版本,然后重试,谢谢!

  http://ppa.launchpad.net/ethereum/ethereum/ubuntu/dists/precise/main/binary-amd64/Packages:404 not found

  http://ppa.launchpad.net/ethereum/ethereum/ubuntu/dists/precise/main/binary-i386/Packages:404 not found


    在ubuntu12.04 LTS系统版本上安装ethereum开发环境,遇到了N多问题,解决过程也并不顺利,这里把问题和解决步骤一一记录下来,以供大家参考;如果表达不准确或者不完整,还请大家给出修改意见,谢谢!

    每个系统安装指令请参考:https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum 。(个人觉得技术学习因该需找技术的源头,读专业的书,看专业的文档;每个优秀的开源项目都有一个优秀的wiki)

1. 安装ethereum

    sudo apt-get install software-properties-common

    sudo add-apt-repository -y ppa:ethereum/ethereum

    sudo apt-get update

     sudo apt-get install ethereum

    执行 sudo apt-get update 和 sudo apt-get install ethereum遇到了如下错误:


Install Ethereum Failed

    从上面的 fail log可以看出 sudo apt-get update操作时,http://ppa.launchpad.net/ethereum/ethereum/ubuntu/dists/precise/main/binary-amd64/Packages ,http://ppa.launchpad.net/ethereum/ethereum/ubuntu/dists/precise/main/binary-i386/Packages这两个URL对应的资源不存在。用浏览器打开以上两个URL,确实返回了404。妈呀,到底哪错了?猜测一下可能有两个原因:

    a. Ubuntu访问的URL是错误的;

    b. 这两个URL对应的资源确实不存在;(仔细想想基本没有这种可能,ethereum这种大的开源项目会犯这种错误?)

    a 错误可能行更大,百度了一把发现了其他用户遇到了该问题:https://www.shiyanlou.com/questions/65916;

    访问这个URL:http://ppa.launchpad.net/ethereum/ethereum/ubuntu/dists/,如下图所示:

precise目录不存在

    precise目录不存在,那其他目录是什么含义呢?熟悉ubuntu的可能一看就知道了,如下图所示:

Ubuntu OS Version Map

    由上图可知,ethereum安装包要求的ubuntu最少也是14.04 LTS,妈呀,原来时Ubuntu版本太老了!身为一个程序员感觉很丢人。立即升级系统,方法如下:https://zhidao.baidu.com/question/136614754960431605.html。

2.Ubuntu系统升级

    好了,准备去升级了。以上是在公司64位ubuntu 12.04 LTS系统上配置的,无法升级(IT说升级到14.04一些内部软件无法使用,哎),所以回家升级自己的32位ubuntu 12.04 LTS。升级过程很简单,就按照更新管理器提示操作,但是下载软件包的时间较长,我的环境升级了3个小时。

Upgrade to 14.04 TLS

3. 在Ubuntu 14.04 上重新安装Ethereum

   版本升级到14.04之后重新执行一下命令:

    sudo apt-get install software-properties-common

    sudo add-apt-repository -y ppa:ethereum/ethereum

    sudo apt-get update

     sudo apt-get install ethereum

    哈哈,终于成功安装了。个人觉得在下面wiki page上应该加上版本最低Ubuntu14.04 LTS:

    https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu

综上所述,这就是我在Ubuntu12.04 LTS安装Ethereum遇到的问题,根本原因就是系统版本太低。为了节省大家的时间,我在文章开始做了提示,也希望对大家有帮忙。从解决这个问题的过程中,也意识到自己在Unix/Linux还是个老菜鸟,需要好好地不断去学习积累。

你可能感兴趣的:(Ubuntu 12.04 LTS安装ethereum开发环境问题解决)