Friday, December 16, 2016

WINDOWS SUBSYSTEM使用中遇到的问题


  1. sudo: unable to resolve host OPTIMISTPRIME
解决方法:http://iamnotmyself.com/2016/07/13/windows-subsystem-for-linux-error-unable-to-resolve-host-2/

编辑/etc/hosts 加入一行127.0.0.1 OPTIMISTPRIME


2.安装redis-server遇到问题如下:
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory

此问题基本使用subsystem都会遇到
解决方法:
This is an issue that everyone will start seeing. We need to add something on this in our official docs.
As @nuclearmistake points out, udev is something that breaks in apt-get but the errors should not cause any issues in WSL. We have reached out to Canonical on this one asking for the best solution and they recommend the following changes:
Write the following to /usr/sbin/policy-rc.d
#!/bin/sh
exit 101
chmod +x /usr/sbin/policy-rc.d
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
I have tried this one myself and it looks to work quite well.

参见https://github.com/Microsoft/BashOnWindows/issues/143

3.直接执行redis-server启动redis,起不来,使用sudo redis-server能够启动,但是redis-cli不能联通

方法如下:
执行sudo service redis-server start

参见:https://github.com/Microsoft/BashOnWindows/issues/365

jetbrains 激活

http://jetbrains.tencent.click
IntelliJ IDEA 2016.2.4


1. 到网站 http://idea.lanyus.com/ 获取注册码。
2.填入下面的license server:
  http://intellij.mandroid.cn/
  http://idea.imsxm.com/
  http://idea.iteblog.com/key.php
2017.3版本更新后2已失效,使用1吧,或者自行搭建授权服务器(1上有教程)
idea 还可以申请edu邮箱获取linsence key,有邮箱的可以尝试一下(可以尝试去注册免费的edu邮箱进行申请) https://www.jetbrains.com/zh/student/
http://idea.imsxm.com/
分类: idea