在升级win8.1之后,重新安装的Git虽然可以正常使用 但遇到https时会报“Unable to find remote helper for ‘https’”的错误

网络搜索了许久未果,于是自己研究

  1. 检查安装的文件 结果:所有文件均完整

  2. 检查文件的访问权限 结果:所有文件当前用户均可访问

  3. 为调用的git等exe文件授予管理员运行权限 结果:问题依旧存在

挣扎了半天,尝试重装解决。

在重装的时候选择了 管理员权限运行 结果意外的发现重装后,https可以正常使用了。

至此问题解决。

#!/usr/env python
"""
:license: MIT

Copyright (C) 2012 HustMoon

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
from __future__ import with_statement

import zlib, sys

def b128encode(buf, escape=False):
    if not buf: return ''
    buf = bytearray(buf)
    res = bytearray((len(buf) * 8 + 6) / 7)
    p, s, i = 0, 1, 0
    for n in buf:
        res[i] = ((p << (8 - s) | (n >> s)) &amp; 0x7F) | 0x80; i += 1
        if s == 7:
            res[i] = n | 0x80; i += 1
            p, s = 0, 1
        else:
            p, s = n, (s + 1) % 8
    if s != 1:
        if s == 2 and p < 0x80:
            i -= 1
        else:
            p = (p << (8 - s)) &amp; 0x7F
        p = chr(p)
        if escape:
            p = p.encode('string-escape')
        res[i:] = p
    return str(res)

def dcode():
    code = r'''def code(__=code):
 (_______)=(globals)();del((_______)['code'])
 if(((_______).get('__doc__'))is((None))):
  (__)=(map)((ord),(__)[(339):]);(______)=[0]*(((((len)((__))+(1))*(7))/(8)));((___),(____),(_____))=((0),(0),(0))
  for((__))in((__)):
   if((__)<(128)):break
   if((____)==(0)):((___),(____))=((__),(1))
   else:
    (______)[(_____)]=((((___)<<(____))|(((__)&amp;(127))>>((7)-(____))))&amp;(255));(_____)+=(1);((___),(____))=((__),(((____)+(1))%(8)))
  if((__)<(128)):
   if((____)!=(0)):
    (__)=((((___)<<(____))|((__)>>((7)-(____))))&amp;(255))
   (______)[(_____):]=[((__))]
  elif((____)!=(0)):del((______)[(_____):])
  exec((''.join((map)((chr),(______))).decode('zlib')))in((_______))
  if(((_______).get('__doc__'))is((None))):(_______)['__doc__']=''
code()
'''
    return ''.join([c.encode('string-escape') if ord(c) < 128 else c
                    for c in zlib.compress(code, 9)])
dcode = dcode()

def encode(infile, outfile):
    with open(infile, 'rU') as fp:
        code = fp.read().rstrip('n') + 'n'
    code = b128encode(zlib.compress(code, 9), True)
    code = r'''# -*- coding: latin-1 -*-
code = '%s'
exec(code.decode('zlib'))
''' % (dcode + code)
    with open(outfile, 'wb') as fp:
        fp.write(code)

def decode(infile, outfile):
    with open(infile, 'rU') as fp:
        code = fp.read().rstrip('n') + 'n'
    code = code.replace("exec(code.decode('zlib'))", "exec(code.decode('zlib')"
        ".replace('exec','fp.write').replace('in((_______))',''))")
    with open(outfile, 'wb') as fp:
        eval(compile(code, 's', 'exec'), {'fp':fp})

def main():
    try:
        if sys.argv[1] == '-d':
            func = decode
            infile, outfile = sys.argv[2:4]
        else:
            func = encode
            infile, outfile = sys.argv[1:3]
    except ValueError:
        print >>sys.stderr, 'Usage: zipcode.py [-d] infile.py outfile.py'
        raise SystemExit(-1)
    func(infile, outfile)

if __name__ == '__main__':
    main()

不再需要导入atl.lib库了,直接包含以下头文件就可以了

#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>

要使用 AtlAxAttachControl 等函数的话,则必须初始化ATL模块

CComModule _Module;
_pAtlModule = &_Module;

我们这里使用源码编译安装,直接按顺序执行下列命令就可以成功(我都是假设已经有root权限的情况下,所以执行之前请确认自己已有root权限):

yum install -y mercurial gcc-c++ gcc
mkdir /usr/local
cd /usr/local
hg clone -r release https://go.googlecode.com/hg/ go
cd /usr/local/go/src
chmox +x all.bash
./all.bash
mkdir /root/go
export GOROOT=/usr/local/go
export GOPATH=/root/go
export GOBIN=/usr/local/go/bin
export GOOS=linux
export PATH=.:$PATH:/usr/local/go/bin

现在应该已经可以执行go命令测试了:

[root@root]# go version
go version go1.3.3 linux/amd64

如果想要每次进入bash时都拥有go环境,则需要新建一个文件:/etc/profile.d/go.sh 并写入以下内容

export GOROOT=/usr/local/go
export GOPATH=/root/go
export GOBIN=/usr/local/go/bin
export GOOS=linux
export PATH=.:$PATH:/usr/local/go/bin

现在随时都可以执行go命令了。

:)

今天给一台CentOS系统安装openssl-devel时,出现了如下信息:

[root@centos]# yum install -y openssl-devel
Loaded plugins: fastestmirror, security
Repository updates is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 0:1.0.1e-16.el6_5.14 will be installed
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.1e-16.el6_5.14.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.10.3-15.el6_5.1 will be installed
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.10.3-15.el6_5.1.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.10.3-15.el6_5.1.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.10.3-15.el6_5.1.x86_64
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.4-4.el6 will be installed
---> Package libcom_err-devel.x86_64 0:1.41.12-18.el6 will be installed
---> Package libselinux-devel.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
--> Processing Dependency: libselinux = 2.0.94-5.3.el6_4.1 for package: libselinux-devel-2.0.94-5.3.el6_4.1.x86_64
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.3.el6_4.1.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.3.el6_4.1.x86_64
--> Running transaction check
---> Package libselinux.i686 0:2.0.94-5.3.el6_4.1 will be installed
--> Processing Dependency: libdl.so.2(GLIBC_2.1) for package: libselinux-2.0.94-5.3.el6_4.1.i686
--> Processing Dependency: libdl.so.2(GLIBC_2.0) for package: libselinux-2.0.94-5.3.el6_4.1.i686
--> Processing Dependency: libdl.so.2 for package: libselinux-2.0.94-5.3.el6_4.1.i686
--> Processing Dependency: libc.so.6(GLIBC_2.8) for package: libselinux-2.0.94-5.3.el6_4.1.i686
--> Processing Dependency: ld-linux.so.2(GLIBC_2.3) for package: libselinux-2.0.94-5.3.el6_4.1.i686
--> Processing Dependency: ld-linux.so.2 for package: libselinux-2.0.94-5.3.el6_4.1.i686
---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6_5.2 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.132.el6_5.2.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.132.el6_5.2.i686
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.14.3-10.el6_5 will be installed
--> Finished Dependency Resolution
Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

         1\. You have an upgrade for libselinux which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of libselinux of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude libselinux.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2\. You have multiple architectures of libselinux installed, but
            yum can only see an upgrade for one of those arcitectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.

         3\. You have duplicate versions of libselinux installed already.
            You can use "yum check" to get yum show these errors.

       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).

       Protected multilib versions: libselinux-2.0.94-5.3.el6_4.1.i686 != libselinux-2.0.94-5.3.0.1.el6.centos.plus.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

最后在一个日文的网站上找到了解决办法:

yum install --enablerepo=centosplus openssl-devel

参考:http://blog.urban-theory.net/2014/06/16/openssl-devel-install-fails-on-centos-with-docker

当内核加载失败时,使用以下命令查看出错记录,可以帮助找到问题所在:

dmesg | tail -n 30
yum install rpmdevtools yum-utils ncurses-devel make rpm-build rpm-devel
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.10.tar.gz
tar xvf linux-3.8.10.tar.gz
cd linux-3.8.10
make mrproper # 第一次可忽略
make menuconfig # 记得保存
make
make modules_install
make install
new-kernel-pkg --mkinitrd --depmod --install 3.8.10

每次重装系统后,装驱动很容易有一个名为“COMPAL Embedded System Control”的驱动未安装。 而使用驱动精灵等驱动智能安装类的软件安装后很容易出现驱动显示是装好了,但会提示个感叹号说明该设备无法正常工作。

网上搜了半天终于找到一个说法: 这个驱动是热量控制,64位win7/win8无法完全安装设备管理器里更新驱动然后手动定位到C盘ProgramData里的Vista64安装即可

尝试后问题解决。 记录此文章,留给跟我出现同样问题的朋友。希望能有所帮助。