Ubuntu12.04 不能启动,显示 "Could not write bytes: broken pipe"
来源:互联网 发布:php判断蜘蛛 编辑:程序博客网 时间:2024/06/05 17:08
Ubuntu启动的时候加载环境变量的过程大致为:
/etc/enviroment
/etc/profile
-->/etc/bash.bashrc
-->/etc/profile
-->/etc/profile.d下的所有.sh文件
~/.profile (或~/.bash_profile 或 ~/.bash_login)
-->~/.bashrc (如果在运行bash才运行)
-->~/.bash_aliases
-->/etc/bash_completion
其中前两个是系统环境变量,最后一个是当前用户的局部环境变量。
/etc/enviroment在系统一些核心组件加载完成后最先调用,很多外围的程序都依赖它运行,
如果这里面出现了什么问题,那么很可能导致系统无法正常启动,相当于是系统级别的公共环境变量
/etc/profile 在启动登陆环境时被首先执行,相当于是应用级的公共环境变量
~/.profile在shell被打开时,次于/etc/profile执行,相当于是应用级的用户环境变量
注意~/.profile是在打开shell时执行的,也就是说如果在它或者它会调用的脚本(一般是.bashrc)里面配置的环境变量,在图形界面下是无效的!
如果想要配置在图形界面下依然有效的环境变量,可以放在/etc/prfile.d/下建立一个.sh文件,写入相应内容,例如JAVA_HOME。
出现本案例所描述的问题的原因一般是修改了:/etc/enviroment并且出现了一些错误,导致启动异常。
这有可能是:在修改的时候出现了一些逻辑上的错误包括打错字之类的;也有可能是修改的环境变量(如PATH)导致一些系统需要的程序被自定义的替代了。
将/etc/enviroment文件中我添加的东西删除掉之后,一切正常。
所以如果要加入或修改环境变量,还是在~/profile或者/etc/profile(/etc/profile.d/)中进行修改吧。
因为无法登录图形界面所以需要切换登陆模式,使用快捷键:ctrl+alt+f1(ubuntu12.04) 或 ctrl+shift+alt+f1
若登录成功后还是无法使用vi、sudo等命令,出错提示:The command count not be located because '/bin' is not included in the PATH
是由于没有加载到/usr/bin/下的命令,所以要执行export操作:export PATH=/usr/bin/:$PATH
这个时候,就可以sudo vi /etc/enviroment 和 sudo vi /etc/proflie了。
本案例也会出现类似 “Checking battery state” 提示信息。
进入命令行登录模式后:
sudo apt-get install gdm
sudo dpkg-reconfigure gdm
重新选择显示器,从GDM到LightDM,选lightdm模式,重启即可。
如果已经安装刚 sudo /etc/init.d/lightdm restart 切换即可。
- Ubuntu12.04 不能启动,显示 "Could not write bytes: broken pipe"
- Ubuntu12.04 不能启动,显示 "Could not write bytes: broken pipe"
- could not write bytes broken pipe
- Ubuntu could not write bytes broken pipe
- could not write bytes: Broken pipe解决
- could not write bytes: Broken pipe解决
- could not write bytes: Broken pipe解决
- could not write bytes Broken pipe
- could not write bytes: Broken pipe解决
- Ubuntu could not write bytes broken pipe
- Ubuntu could not write bytes broken pipe
- could not write bytes: Broken pipe解决
- 解决: could not write bytes broken pipe ubuntu
- Ubuntu 12.04开机出现:could not write bytes:broken pipe
- Ubuntu could not write bytes: broken pipe开机出现
- Ubuntu 12.04 出现“Could not write bytes: broken pipe”原因与解决
- Ubuntu 12.04输入密码后出现“Could not write bytes: broken pipe”原因与解决
- ssh--write failed broken pipe
- iOS后台播放音乐
- hdu 2830 Matrix Swapping II (dp+树状数组)
- Epydoc——Python文档化开发注释规范化工具
- uva 11825 Hackers' Crackdown(动态规划-状态压缩DP)
- 八皇后问题
- Ubuntu12.04 不能启动,显示 "Could not write bytes: broken pipe"
- WWDC:苹果走向开放和封闭的极端
- centos 6 配置yum
- Spin Lock -- TAS和TTAS
- 远程登录CentOS,短时间就断线的处理
- 频域时域关系
- mysql数据库基本操作(一)
- jquery插件开发全解析,这个更清晰完整点
- http协议