1.运行sudo apt-get update出现如下问题:
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: Failed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/trusty/InRelease
W: Some index files failed to download. They have been ignored, or old ones used instead.
解决方法:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 76F1A20FF987672F
2.ssh普通用户登录服务器提示:Permission denied, please try again.
出现这种提示网上有很多解决办法,整理了下大概如下,基本都是修改/etc/ssh/sshd_config文件:
1)添加AllowUsers 用户名
2)注释掉PermitRootLogin、关掉StrictModes
3)设置PasswordAuthentication yes
4)查看/etc/security/access.conf中是否存在-:ALL EXCEPT root :ALL 如果存在上述配置,将-:ALL EXCEPT root :ALL修改成-:ALL EXCEPT root 普通用户 :ALL
以上几种方法试了下都没能解决我的问题,最后有看到说需要改/etc/passwd文件的,然后打开看了下,发现我的当前用户配置果然有点奇怪,如下配置:
用户名:x:1000:1000:用户名,,,:/home/用户名:quit
最后怎么是以quit结尾,因为root用户ssh可以登陆,所以按照root的配置改成了/bin/bash,结果竟然奏效了,现在把这个奇葩情况贴出来也供各位看官参考下,也不枉我折腾这么久了
3.执行Makefile文件报错
不久前随便写了个驱动c文件,想编译成模块,用insmod加载进去看看效果,结果每次make都提示如下错误:
make: Nothing to be done for `all'.
今天偶然看到一篇文章叙述碰到make报错问题是Tab键导致的问题,我便打开我的Makefile文件看了下,发现确实我的Tab键输出的是4个空格,最后试了下解决方案,在.vimrc中加如下一句代码,根据判断文件类型是make文件就不让Tab键输出成4个空格,问题就完美解决啦
autocmd FileType make set noexpandtab