Ubuntu 问题集合

来源:互联网 发布:网络支付安全问题 编辑:程序博客网 时间:2024/06/08 18:09
1.Ubuntu下 ssh : connect to host localhost port 22:Connection refused
Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused
 
造成这个错误的原因可能是ssh-server未安装或者未启动。ubuntu 11.10 默认安装openssh-client,但是木有安装server
 
运行 ps -e | grep ssh,查看是否有sshd进程
 
如果没有,说明server没启动,通过 /etc/init.d/ssh -start 启动server进程,如果提示ssh不存在 那么就是没安装server


安装 apt-get install openssh-server
若出现 
Package openssh-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package openssh-server has no installation candidate

1  注视掉/etc/apt/source.list中的所有源,然后sudo apt-get update,sudo apt-get upgrade
2  用sudo apt-get autoremove openssh-client卸载原来的openssh-client
3  在/etc/apt/source.list中加入可用源,然后sudo apt-get update,sudo apt-get upgrade
4  apt-get install openssh-server
若出现依赖性问题 The following packages have unmet dependencies

1  dpkg -r --force-depends libgtk2.0-0(包名)
2  联合使用 apt-get upgrade apt-get -f install就可以了


apt-get -f install一般是在安装错误时使用的,在包的依赖错误时有时候会出现以上错误。
这个错误导致apt-get 不能执行其它安装和卸载任务。


这个时候可以用dpkg -P <PackageName>的方式卸载包。将错误的包都卸载后重新使用apt-get -f install



2.ubuntu12.04管理员账户登录不了桌面,只能客人会话登录
可以参考这个博客 http://blog.csdn.net/wjeson/article/details/9029995



3.如果出现 the system is running in low-graphics mode
则可以这样处理 注意下面的 X11 要大写 X
cd /etc/X11  
sudo cp xorg.conf.failsafe xorg.conf 
reboot重启就好了


或 sudo gdm start



4.ubuntu用不了root用户:~$ su - root Password: su: Authentication failure怎么办?
执行下面的操作:
1.先解除root锁定,为root用户设置密码
打开终端输入:sudo passwd


5.ubuntu 关防火墙 sudo ufw disable


6.若出现sudo: unable to resolve host zj-VirtualBox 
/etc/hosts 修改为   127.0.0.1  localhost zj-VirtualBox 
0 0
原创粉丝点击