linux整理错误集合

错误 1

 

   
   
  1. The program package-cleanup is found in the yum-utils package 

解决方法:

   
   
  1. # yum clean all 
  2. # rpm --rebuilddb 
  3. # yum update 

 

使用解决方法仍然报错,根据错误信息 检查 /etc/yum.conf 确保 没有这行 exclude=*.i386 *.i586 *.i686

结束

原来使用yum 安装软件时会自动安装上两个版本的,xxx.i386 与 xxx.x86_64 ,由于我使用的基本是64 位操作系统,所以在 /etc/yum.conf 屏蔽安装所有 i386 软件包,造成了这个错误。

 

错误2

   
   
  1. login: PAM [dlerror: /lib/security/pam_limits.so: cannot open shared object 
  2. file: No such file or directory] 

解决方法

   
   
  1. vim /etc/pam.d/login 
  2. 修改 
  3.  
  4. "session    required     /lib/security/pam_limits.so" 
  5.  
  6. 为 
  7. "session    required     /lib64/security/pam_limits.so" 
  8.  
  9. 重启 

 错误3

   
   
  1. /usr/local/php/bin/phpize  
  2. Cannot find config.m4.  
  3. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module 

解决方法

   
   
  1. # ls 
  2. config0.m4  CREDITS    openssl.dsp  php_openssl.h  tests 
  3. config.w32  openssl.c  openssl.mak  README         xp_ssl.c 
  4. ln -s config0.m4 config.m4 
  5. # ls 
  6. config0.m4  config.w32  openssl.c    openssl.mak    README  xp_ssl.c 
  7. config.m4   CREDITS     openssl.dsp  php_openssl.h  tests 
  8.  
  9. /usr/local/php/bin/phpize  
  10. Configuring for: 
  11. PHP Api Version:         20041225 
  12. Zend Module Api No:      20060613 
  13. Zend Extension Api No:   220060519 

#3.1 We selected 'Asia/Chongqing' for 'CST/8.0/no DST'  

   
   
  1. cat /etc/sysconfig/clock 
  2. ZONE="Asia/Shanghai" 
  3.  
  4. //修改一下php.ini的时区 
  5. date.timezone = Asia/Shanghai 

 

错误4

   
   
  1. Last login: Fri Mar 30 14:34:50 2012 from 172.0.0.50 
  2. id: cannot find name for group ID 525 

解决方法

   
   
  1. useradd -g zm zm
  2. 或者 
  3. useradd -G zm zm

 

错误 5 netfilter 相关

   
   
  1. Apr  1 13:29:24 haproxy_t kernel: nf_conntrack: table full, dropping packet. 
  2. Apr  1 13:29:25 haproxy_t kernel: nf_conntrack: table full, dropping packet. 
  3. Apr  1 13:29:25 haproxy_t kernel: nf_conntrack: table full, dropping packet. 
  4. Apr  1 13:29:26 haproxy_t kernel: nf_conntrack: table full, dropping packet. 
  5. Apr  1 13:29:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 
  6. Apr  1 13:30:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 
  7. Apr  1 13:31:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 
  8. Apr  1 13:32:32 haproxy_t kernel: possible SYN flooding on port 80. Sending cookies. 

 kernel: nf_conntrack: table full, dropping packet.

解决方法

rhel5/centos5

   
   
  1. 在/etc/sysctl.conf中加入: 
  2. net.ipv4.netfilter.ip_conntrack_max = 655350 
  3. net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 1200 
  4.  
  5. 立即生效
  6. sysctl -p  

  7. 统计
  8. wc -l /proc/net/ip_conntrack
  9. 34546 /proc/net/ip_conntrack

rhel6/centos6

   
   
  1. 在/etc/sysctl.conf中加入:  
  2. net.nf_conntrack_max = 100000
  3.  
  4. 立即生效
  5. sysctl -p 
  6.  
  7. 统计
  8. wc -l /proc/net/nf_conntrack
  9. 51962 /proc/net/nf_conntrack

扩展

   
   
  1. kernel 用 ip_conntrack 模块来记录 iptables 网络包的状态,并保存到 table 里(/proc/net/ip_conntrack|/proc/net/nf_conntrack),
  2. 如果网络状况繁忙,比如高连接,高并发连接等会导致逐步占用这个 table 可用空间,
  3. 一般这个 table 很大不容易占满并且可以自己清理,table 的记录会一直呆在 table 里占用空间直到源 IP 发一个 RST 包,
  4. 但是如果出现被攻击、错误的网络配置、有问题的路由/路由器、有问题的网卡等情况的时候,就会导致源 IP 发的这个 RST 包收不到,
  5. 这样就积累在 table 里,越积累越多直到占满,满了以后 iptables 就会丢包,出现外部无法连接服务器的情况。 
  6.  
  7. 知道问题就好办了,要么增加 table 容量以便能记录更多的连接信息(会消耗一点内存),要么就卸载 ip_conntrack 模块。 

 

错误6 (编译 nrpe for nagios)

   
   
  1. [root@three nrpe-2.13]# make all 
  2. cd ./src/; make ; cd .. 
  3. make[1]: Entering directory `/root/nagios/nrpe-2.13/src' 
  4. gcc -g -O2 -I/usr/local/openssl/include/openssl -I/usr/local/openssl/include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c acl.c -L/usr/lib64  -lssl -lcrypto -lnsl -lwrap  
  5. nrpe.c: In function ‘main’: 
  6. nrpe.c:218: warning: assignment discards qualifiers from pointer target type 
  7. nrpe.c:251: warning: assignment makes pointer from integer without a cast 
  8. /tmp/ccK17MBg.o: In function `main': 
  9. /root/nagios/nrpe-2.13/src/nrpe.c:251: undefined reference to `get_dh512' 
  10. collect2: ld returned 1 exit status 
  11. make[1]: *** [nrpe] Error 1 
  12. make[1]: Leaving directory `/root/nagios/nrpe-2.13/src' 
  13.  
  14. *** Compile finished *** 
  15.  
  16. If the NRPE daemon and client compiled without any errors, you 
  17. can continue with the installation or upgrade process. 

原因

   
   
  1. 在/usr/local/目录下装有openssl,导致  配置时调用配置目录 -I/usr/local/openssl/include,而非系统自带 

解决方法

   
   
  1. [root@three nrpe-2.13]# vim configure 
  2. 行6630  去掉 /usr/local/openssl 即可,
  3. 如"for dir in $ssl_inc_dir $ssl_dir /usr/local/openssl /usr/local/ssl" 
  4. [root@three nrpe-2.13]# ./configure  #再次配置
    ....
    [root@three nrpe-2.13]# make all
  5. .... *** Compile finished ***                                      #通过

 

错误7 named  (zone test.com/IN: not loaded due to errors.)

原因

   
   
  1. $ tail /var/log/messages 
  2. May  7 10:42:00 one named[27080]: reading built-in trusted keys from file '/usr/local/named/etc/bind.keys' 
  3. May  7 10:42:00 one named[27080]: using default UDP/IPv4 port range: [1024, 65535] 
  4. May  7 10:42:00 one named[27080]: using default UDP/IPv6 port range: [1024, 65535] 
  5. May  7 10:42:00 one named[27080]: sizing zone task pool based on 2 zones 
  6. May  7 10:42:00 one named[27080]: reloading configuration succeeded 
  7. May  7 10:42:00 one named[27080]: reloading zones succeeded 
  8. May  7 10:42:00 one named[27080]: zone test.com/IN: NS 'ns1.test.com' has no address records (A or AAAA) 
  9. May  7 10:42:00 one named[27080]: zone test.com/IN: not loaded due to errors. 
  10. May  7 10:42:00 one named[27080]: all zones loaded 
  11. May  7 10:42:00 one named[27080]: running 

 解决方法(注意ns1.test.com.的".")

   
   
  1. $TTL 600  
  2. @       IN      SOA     ns1.test.com.   root.test.com. ( 
  3.         2009050401 
  4.         3600 
  5.         600 
  6.         3600000 
  7.         1800 ) 
  8. @               IN      NS      ns1.test.com. 
  9. ns1             IN      A       192.168.57.71 
  10. www             IN      A       192.168.57.71     
  11. monitor         IN      A       192.168.57.70  

 mysql (Column count of mysql.db is wrong. Expected 22, found 20. The table is probably corrupte)

   
   
  1. 120511 14:26:49 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. The table is probably corrupted 
  2. 120511 14:26:49 [ERROR] mysql.user has no `Event_priv` column at position 29 
  3. 120511 14:26:49 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. 

 

错误8 keepalived ip address associated with VRID not present in received packet

原因

   
   
  1. 5913 May 16 15:26:04 ha02 Keepalived_vrrp: ip address associated with VRID not present in received packet : 192.168.57.75 
  2. 5914 May 16 15:26:04 ha02 Keepalived_vrrp: one or more VIP associated with VRID mismatch actual MASTER advert 
  3. 5915 May 16 15:26:04 ha02 Keepalived_vrrp: bogus VRRP packet received on eth0 !!! 
  4. 5916 May 16 15:26:04 ha02 Keepalived_vrrp: VRRP_Instance(VI_1) ignoring received advertisment... 
  5. 5917 May 16 15:26:05 ha02 Keepalived_vrrp: ip address associated with VRID not present in received packet : 192.168.57.75 
  6. 5918 May 16 15:26:05 ha02 Keepalived_vrrp: one or more VIP associated with VRID mismatch actual MASTER advert 
  7. 5919 May 16 15:26:05 ha02 Keepalived_vrrp: bogus VRRP packet received on eth0 !!! 
  8. 5920 May 16 15:26:05 ha02 Keepalived_vrrp: VRRP_Instance(VI_1) ignoring received advertisment.. 

解决方法

   
   
  1. 在同一网段内virtual_router_id 值不能相同,如果相同会在messages中收到VRRP错误包 
  2. 所以需要更改 virual_router_id

错误9 fdisk partition table entries are not in disk order

   
   
  1. fdisk /dev/sdb  (用你的硬盘位置代替/dev/sdb) 
  2.  
  3. 有提示后输入 x 回车, 
  4. 在命令列表中会有一项 
  5. f   fix partition order 
  6. 输入 f 回车 
  7. 成功会提示 done. 
  8. 然后输入 p 回车,查看调整后的分区表 
  9. 最后输入 w 回车,这个命令是将之前的操作写入硬盘 
  10. 重启之后就会启用新的分区表。 

错误10 ubuntu error:unknown filesystem

   
   
  1. 因为我的电脑是Ubuntu的,开机用的是grub引导,而grub就放在Ubuntu里的/boot/grub下。由于我修复分区顺序
  2. 导致grub找不到原先的Ubuntu所在分区,自然就找不到/boot/grub了,因此解决这个问题很简单,只要把grub和/boot/grub对应上就可以了。 

2 编辑 /boot/grub/grub.cfg

替换原来分区比如, 旧的是 hd0,msdos8 替换成 hd0,mdos6

3 重装grub

grub-install /dev/sda

错误11 /lib/modules/2.6.32-71.el6.x86_64/build: No such file or directory. Stop.

   
   
  1. //如果出现如下错误 
  2. make: *** /lib/modules/2.6.32-71.el6.x86_64/build: No such file or directory. Stop. 
  3.  
  4. //进去相关的目录看,这个文件是个软链接,显示位红色,说明链接未成功,用一下命令重新链接一次就OK了 
  5. ln -s ../../../usr/src/kernels/2.6.32-71.29.1.el6.x86_64/ build 

错误12  php

upload_max_filesize = 2M  //上传附件大小限制在2M

   
   
  1. vim /etc/php.ini 
  2. upload_max_filesize = 16M 

 

错误13 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

修改  /etc/ssh/ssh_config

vim  /etc/ssh/ssh_config

GSSAPIAuthentication no

 

错误14

nfs:server is not responding,still trying

方法1 :
我在arm上通过NFS共享文件时出现下面的错误提示
nfs:server is not responding,still trying

原因分析:NFS 的默认传输协议是 UDP,而PC机与嵌入式系统通过UPD交互时就会出现严重的网卡丢包现象。

解决方法:在客户端改用TCP协议,使用下面的命令,
#mount -o tcp 10.10.19.25:/home/export /mnt/local

方法2:
在目标板上通过NFS复制PC机上较大文件到目标板上的时候遇到的问题:
nfs: server *** not responding, still trying

修改方法:
nfs mount时候出现的NFS崩溃,按照以下的方式mount
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.1.3/root/somedir /client

 

错误15

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值