【问题收录】Ubuntu(14.04)那些我遇到的各种事

前端之家收集整理的这篇文章主要介绍了【问题收录】Ubuntu(14.04)那些我遇到的各种事前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.“启动会话失败”的解决方法

1.1问题描述

登录的时候输入密码总是出现启动会话失败的提示@H_502_17@

1.2 解决方

按住 ctrl + Alt + F1 进入到tty @H_502_17@

输入你自己的用户名
输入相应的密码@H_502_17@

之后输入如下命令:@H_502_17@

sudo apt-get install ubuntu-session

这个办法应对于删东西时auto-remove把session删了的情况@H_502_17@

最后:@H_502_17@

sudo shutdown -r now

或者是:@H_502_17@

sudo reboot



Ubuntu Recovery Mode

怎么进入到安全模式:
在电脑启动的时候按住shift键,就可以进入到recovery mode@H_502_17@

(注:图片来自网上)@H_502_17@

点击进入到recovery mode 之后我们可以看到下面的界面:@H_502_17@

resume Resume normal boot
继续正常模式启动,这个模式是提供给那些不小心误入此选项的使用者使用,可以使他们继续之前正常的启动模式@H_502_17@

clean Try to make free space
清理软件包,尝试清除硬盘中不必要的档案的存放空间@H_502_17@

dpkg Repair broken packages
修护损害的安装包@H_502_17@

fsck Check all file systems
硬盘检查与修护坏道/逻辑坏道 进行磁盘/硬盘 扫描修复,适合不正常的开机使用@H_502_17@

grub update grub bootloader
更新grub 引导@H_502_17@

network Enable networking
带网络连接的shell界面,直接以文字模式启动,并且开启网络连线支援@H_502_17@

root Drop to root shell prompt
最高的管理员的shell界面@H_502_17@

system-summary System summary
查看系统的信息/资料@H_502_17@


* 3. Starting the Winbind daemon winbind [fail] 解决方案*

首先可以选择进入tty模式,或者是recovery mode
输入;@H_502_17@

sudo dpkg --configure -a
sudo apt-get -f install

如果失效,输入下面的语句@H_502_17@

strace -f dpkg --configure winbind 2>&1 | grep execve

重启:@H_502_17@

sudo reboot

参考连接: https://ubuntuforums.org/showthread.php?t=1593333@H_502_17@



4. Starting SMB/CIFS File and Active Directory Server. [FAIL]

安装smaba:@H_502_17@

sudo apt-get smaba

Starting SMB/CIFS File and Active Directory Server. [FAIL] @H_502_17@

解决方案:@H_502_17@

echo manual |sudo tee /etc/init/samba-ad-dc.override


5. 安装桌面环境

如果某些情况下Ubuntu的桌面环境垮了,或者说在安装完系统之后没有出现桌面环境,这个时候我们需要重新安装整个图形界面,和桌面环境。@H_502_17@

一般这种情况,我是进入到recovery mode 中选择root选项直接安装的,或者是在tty这个模式下安装的
安装桌面系统:@H_502_17@

sudo apt-get install gdm

或者安装一个轻量级的@H_502_17@

sudo apt-get install lightdm

安装完这个时候的呢,你会得到一个图形界面,但是并没有其他东西,也就是说你能看到一个桌面,但是这个桌面上什么 也没有,没有状态栏,没有桌面图标,等等,就是一个非常干净的桌面,这个时候我们可以为我们的Ubuntu安装桌面系统@H_502_17@

一般我采取的命令就是下面这个@H_502_17@

sudo apt-get install ubuntu-desktop

还有不同的版本可以自己选择@H_502_17@

輕巧的桌面環境Xfce@H_502_17@

ubuntu:~$ sudo apt-get install xubuntu-desktop

KDE桌面環境@H_502_17@

ubuntu:~$ sudo apt-get install kubuntu-desktop

亲测有效@H_502_17@

当然还有其他的方法,然而可能是因为我之前少了什么库,所以没有成功。主要是自己拿自己的电脑开刀,各种删,我也不知道少了什么。@H_502_17@

参考其他的人的方法如下操作:@H_502_17@

sudo apt-get install gnome-applets gnome-panel gnome-session gnome-terminal nautilus Metacity gdm firefox

或者是:@H_502_17@

sudo apt-get install gnome-desktop

参考文献:@H_502_17@

http://blog.lefthander.tw/2010/03/ubuntu-server.html@H_502_17@

http://www.jb51.cc/article/p-fzozfdns-mg.html@H_502_17@



6. Install with sudo app-get install doesn’t work,“Not using locking for read only file /var/lib/dpkg/lock”@H_502_17@

当我们在安装某个东西的时候如果提示出:@H_502_17@

W: Not using locking for read only lock file /var/lib/dpkg/lock E:
Unable to write to /var/cache/apt/ E: The package lists or status file
could not be parsed or opened.@H_502_17@

这个时候的解决办法就是:@H_502_17@

sudo mount -o remount,rw /


7. apt-get update fails to fetch files,“Temporary failure resolving …” error@H_502_17@

参考文献@H_502_17@

https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error@H_502_17@

我进入到recovery mode模式下修复了一下我可能出问题的包就好了。@H_502_17@

然后:@H_502_17@

sudo apt-get clean

之后是:@H_502_17@

sudo apt-get update

如果我们知道我们要添加的源我们可以下面这么做@H_502_17@

假设我们要添加一个临时的DNS 的服务器到我们的系统中,我们可以这么做:@H_502_17@

假设我们添加Google的DNS服务器:@H_502_17@

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

之后更新一下;@H_502_17@

sudo apt-get update

如果永久的添加一个已知的DNS的服务到我们的系统,我们可以这么做:@H_502_17@

echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

这个时候我们需要更新安装包的下载源的文件
我们可以这么做@H_502_17@

sudo vi /etc/apt/sources.list

假设那个旧的源是@H_502_17@

deb http:/archive.canonical.com/ natty backports

我们可以直接替换掉旧的这个下载源的网站。@H_502_17@

或者根据之前我们做的操作,对这行注释,就是加一个#上去。@H_502_17@

#deb http:/archive.canonical.com/ natty backports

保存我们的文档,之后重新更新:@H_502_17@

sudo apt-get update && sudo apt-get upgrade

参考文献:
https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error@H_502_17@

http://www.jb51.cc/article/p-qasrnsdt-mc.html@H_502_17@



8. Failed to get canonical path of /cow@H_502_17@

问题描述:@H_502_17@

对于ubuntu 14.04来说:@H_502_17@

mount /dev/sda1 /mnt
chroot /mnt
update-grub2

Ubuntu16.04@H_502_17@

mount /dev/sda1 /mnt
for dir in /dev /dev/pts /proc /sys /run; do
    mount --bind $dir /mnt$dir
done
chroot /mnt
update-grub2

参考文献@H_502_17@

https://askubuntu.com/questions/254491/failed-to-get-canonical-path-of-cow@H_502_17@



猜你在找的Ubuntu相关文章