情况一: 

重装完ubuntu12.04以后,执行update,然后安装mysql的时候,显示

 

 
  
  1. mysql-server-5.1: 
  2.  Depends: mysql-client-5.1 but it is not going to be installed 
  3.  Depends: libdbi-perl  but it is not installable 
  4.  Recommends: libhtml-template-perl  but it is not installable 

看样子是版本不对的原因,然后去查看源列表,发现源和版本不对,更换以后就好了。

ubuntu的源列表,一定要看好是哪个版本http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8


情况二:

更改完源以后,还是无法update,报错显示Temporary failure resolving .....

执行

 
  
  1. echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null