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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[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

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

1
yum install --enablerepo=centosplus openssl-devel

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

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

1
dmesg | tail -n 30

1
2
3
4
5
6
7
8
9
10
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安装即可

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

原本的程序是控制台的。
但最近需要移植到windows下使用。
所以以MFC来做UI,代码照搬。
一面的一处代码使用了如下语句:

1
boost::split(v, data, boost::is_any_of(_T("n")));

结果编译时出现了如下错误:

1
error C4996: 'std::_Copy_impl'

而且是无论怎么修改都不认,差点打算重写了。

在网络中搜索了半天未果,只能自己分析。好在被我乱猜给猜对了。

我猜是因为boost的string和std的string产生了冲突而导致的。
所以添加上boost的string引用后,问题得以解决。

1
#include <boost/algorithm/string.hpp>

在此留字,希望能帮到遇到同样问题的人。

下载游戏:《古墓丽影9》中文免安装绿色豪华硬盘版[1.1.732.1升级档][解压即玩]
光压缩包所有分卷加起来就有快10个G
结果用QQ旋风下载下来后成乱序的了
然后到网站上一看发现QQ旋风本身就把链接那些顺序没搞对。
参考下载地址:Tomb.Raider.9.v1.1.732.1.CHS.Green.Edition

自己根据使用7-zip打开压缩包的“之前分割”和“之后分割”信息拼凑了半天,结果还是有一个文件“bigfile.001.tiger”不能成功解压。最终放弃。

结果在网上搜索了半天,竟然发现“360压缩”竟然宣称自己可以修复。

原文在:http://yasuo.360.cn/update.html

1
2
3
4
5
6
7
8
1.6正式版(2011-5-26)
1.智能压缩方式,360压缩支持智能极速、强力压缩、标准压缩等压缩方式。智能压缩根据文件智能选择压缩算法,大幅提升压缩速度。
2.多种格式支持,支持解压rar、zip、7z、iso等39种格式的压缩文件。
3.解压速度更快,采用多线程解压处理,优化了解压逻辑,速度更快。
4.损坏格式兼容,对格式头有损坏的压缩包一样修复解压。
* 5.分卷压缩智能解压,智能判断解压rar分卷包时的文件夹名乱序问题。
6.更安全的压缩软件,内含360云安全引擎,对压缩包内木马进行检测,更安全。
7.不断完善的细节体验,支持跳转到桌面、自动消重文件夹等20多处相对传统压缩软件的细节功能改进。

抱着尝试的心态,下载了一个最新版的安装上尝试后。发现真的正常解压了所有压缩包。
总算是解决了目前的尴尬问题,所以在此留文提醒有遇到跟我同样问题的朋友。

成功解压版本:360zip_beta_3.1.0.1071

如果socket想使用HTTP代理,需要进行下面步骤:

  1. connect到代理服务器
  2. send(Format(“CONNECT %s:%s HTTP/1.1rnUser-Agent: MyApp/0.1rnrn”, <真正目标IP>, <真正目标端口>)
  3. recv 数据,并且根据数据内容判断CONNECT协议是否成功(是否有返回”HTTP/1.1 200”)
  4. 如果第3步成功了,那么这个socket就已经是通过HTTP代理来连接的了,剩下的该怎么发包收包都照旧了

错误1

error LNK2019: unresolved external symbol _deflateEnd@4

原因1: 未使用zlib的链接库

  • 解决:
    1
    2
    #pragma comment(lib, "zlibstat.lib") // for static lib
    #pragma comment(lib, "zdll.lib") // for dll lib

原因2:在使用静态库时即使包含了zlibstat.lib没有定义宏“ZLIB_WINAPI”

  • 解决:
    在项目属性中 C/C++ -> Preprocessor -> Preprocessor Definitions 添加“ZLIB_WINAPI”
    注意:这个必须在项目中添加,使用#define来添加是无效的。

错误2

error LNK2026: module unsafe for SAFESEH image

原因:两个项目SAFESEH设置不同

  • 解决:
    设置项目属性: Linker -> Advanced -> [Image Has Safe Exception Handlers] = “No”
    注意:这个必须在项目中添加,使用#pragma来添加是无效的。

错误3

error LNK2005: __call_reportfault already defined in LIBCMTD.lib(invarg.obj)或类似其他的error LNK2005:

原因:与libcmt库冲突了

  • 解决:
    1
    #pragma comment(linker, "/NODEFAULTLIB:libcmt.lib")