Temporary solution for Ubuntu’s “not have a Release file”


It’s wired that when I tried to update the Ubuntu zesty and install some new packages today, I got such errors below.

Err:8 http://security.ubuntu.com/ubuntu zesty-security Release      
  404  Not Found [IP: 91.189.88.161 80]
Err:10 http://archive.ubuntu.com/ubuntu zesty Release
  404  Not Found [IP: 91.189.88.152 80]
Err:12 http://archive.ubuntu.com/ubuntu zesty-updates Release
  404  Not Found [IP: 91.189.88.152 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu zesty Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

And none of the other mirrors works to me. All of them has the same issue “no longer have a Release file”. I did some research and found the error message actually has another form “not have a Release file”.

The solution is easy but tricky — Disable all sources of `security.ubuntu.com` and replace `archive.ubuntu.com` to `old-releases.ubuntu.com`.

Continue reading Temporary solution for Ubuntu’s “not have a Release file”

How to persist goRBAC instance

Introduction

goRBAC provides a lightweight role-based access control (RBAC) implementation in Golang. Normally, the privilege information (roles, parents, and permissions) are saved in the persistent storage, e.g. Database, Files, or Cloud Storage. This post will briefly discuss the technical details of how to load the goRBAC instance from persistent storage and how to save the instance back. In order to make things simple, I will use the JSON file as the persistent storage.
Continue reading How to persist goRBAC instance

Open book collections

All the websites below have a plenty of books and papers for free reading & downloading.

The National Academies Press, free reading and downloading in PDF, account needed for downloading.

Australian National University Open Research Library, all materials come from ANU, fill a form to request the PDF copy.

The University of Adelaide > Library > eBooks, free reading and downloading in HTML, epub, and Kindle.

Curtin University Library, free reading and downloading in PDF.

University of Queensland, part free.

Project Gutenberg, the greatest one, no more explianation.

The New Zealand Digital Library, free reading online.

Cornell University Library, free downloading in PDF.

Bartleby

bibliomania

Elfwood

Thoughs on goRBAC

Code refactoring is not an easy job, but it has to be done in most of the times. I just completed the lightweight role based access control library: goRBAC’s refactoring. There are some feedbacks and questions about the design and usage. I think it would be better writing something to share some design ideas and practice principles which will make things easier.

rbac

The master branch of current goRBAC’s source code is intended to be Version 2. While the previous version has been tagged as Version 1 with the v1.dev branch on Github. And this article will only discuss Version 2 (the master branch).

Continue reading Thoughs on goRBAC

Walking around Mt Albert – Part 2

Followed the previous post: Walking around Mt Albert – Part 1

Alberton, a farmhouse, was built as the residence of Allan Kerr Taylor, who was a notable New Zealand landowner and businessman. Taylor’s family contributed to Mt Albert region a lot. It’s said that the family gave the land to build St. Luck’s Church and donated the church bell. I was planning to visit the Church today as well, but …

Turn back to the house. The gate in the photo is not the original front gate actually. I’m even not sure that if it existed originally. The tour guide said the gate opened at this side just for the reception. The original gate which should be in front of the fountain does not exist anymore. I will show you the fountain latter.

alberton-gate

alberton-name-plate

Continue reading Walking around Mt Albert – Part 2

Walking around Mt Albert – Part 1

Being Auckland about 2 weeks I didn’t write any journals about my trip. One part is about my laziness, the other side is that I don’t have a good idea about my hiking map. I’ve walked back from the city to Mt Albert where I live currently(Yes, it’s 7 km and took me 2 hours). And I took some particular pictures with a lot of fun, something like “Mystery Tunnel”, “Cement Warrior”, etc. You won’t image that! But it didn’t have a clear timeline as a good guide. With some pre-investigations in place and digging on the Internet, I made a great plan. But … Yes! Any decent plan still has an embarrassing BUT … I didn’t complete it. Too far to walk! (Look at the map “Walking around Mt Albert“. BTW, some of the pictures below were shot before this day.)

Original Plan:
original-plan

But:
2016-01-16

Continue reading Walking around Mt Albert – Part 1

如何从源代码构建 Go 1.5 开发环境

请注意,本文正文含有大量链接。如果是转载或者使用某些不支持超链接的阅读器,就请自行脑补吧。

近期,Go Team 连续放出了几个大招来介绍即将在八月问世的 Go 1.5 这个划时代的版本。Rob 和 Andrew 分别在《Go in Go》和《The State of Go》中详细说明了出现在 Go 1.5 中的重要特性和细节变化。在这个版本中最主要的变化是移除了所有 C 代码,不论是 runtime 还是编译器都使用 Go 语言和一小部分的汇编来实现——也就是人们常说的自举。但是这样做也就意味着,Go 在 1.5 和以后的版本中,使用源代码构建 Go
开发环境将面临“鸡生蛋,蛋生鸡”的麻烦(当然了,如果你直接“买鸡蛋”——使用二进制安装包——是没有这个问题的)。
Continue reading 如何从源代码构建 Go 1.5 开发环境

如何用版本工具维护翻译项目

个人来说,一直希望能将《Go指南》这个项目的版本管理从 bitbucket 迁移到 github。但是由于上游英文源项目仍然在用 hg 作为版本管理工具所以一直也没有这么做。前几天 OlingCat 找我,希望将这个翻译项目放在 github 上的 go-zh 项目中。我当然欣然同意,虽然翻译工作还得用 hg 维护,但是 git 上能够有个镜像也是不错的事情。

(中间略过若干 hg –> git 的鸡零狗碎不说)

在等待同步的时候,我简单阅读了一下“Go 项目翻译规范”,发现一个让我觉得很不舒服的设定。

Continue reading 如何用版本工具维护翻译项目

As Golang beyond PHP