Ubuntu server 12.04因为尝试安装过xfce,导致sudo apt-get install xxx 都会返回,如:

 vagrant@precise32:~$ sudo apt-get install phpunit
Reading package lists... Done
Building dependency tree
Reading state information... Done
phpunit is already the newest version.
The following packages were automatically installed and are no longer required:
libclass-isa-perl libswitch-perl
Use 'apt-get autoremove' to remove them.
upgraded, newly installed, to remove and not upgraded.
not fully installed or removed.
After this operation, B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of python-gi:
python-gi depends on python:any (>= 2.7.-0ubuntu2). dpkg: error processing package python-gi (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
python-gi
E: Sub-process /usr/bin/dpkg returned an error code ()

的错误信息,而且安装不到xxx软件,参考 Error 'Depends: python:any. Unmet dependencies' after installing python 2.7.5 之后,运行了

sudo apt-get install --reinstall python

解决了这个问题。

原来我已经安装了ant,phpunit的最新版本,总以为是没安装到,我才觉得我必须更新系统版本才能用,才出现了Ubuntu server 12.04升级到Ubuntu server 14.04.4 之后,出现vagnrat up之后,不能自动登录tty和virtualbox没有共享windows目录的问题,最终还是解决了,YES!

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

目前还是安装不到任何软件,我运行

 sudo apt-get dist-upgrade

进行更新。

,运行之后,既然升级到14.04了。

在重启vagrant之后,因为重写了/etc/sudoers,启动时,会显示

因为看到最后的一句,我觉得是vagrant用户没有自动登录tty

在参考

  1. ubuntu的sudo操作出现下面提示,怎么办?

  2. vagrant up : The following SSH command responded with a non-zero exit status. #1659

  3. Ubuntu新添加用户无法sudo问题的解决:修改sudoers

  4. Linux/Ubuntu sudo不用输入密码的方法
  5. Win7在命令提示符(cmd.exe)中如何进行复制、粘贴工作

我修改了 /etc/sudoers

vagrant@precise32:~$ sudo su -
[sudo] password for vagrant:
root@precise32:~# chmod a+w /etc/sudoers
root@precise32:~# vi /etc/sudoers
root@precise32:~# chmod a-w /etc/sudoers
root@precise32:~# sudo shutdown -h now

我将/etc/sudoers中的root下添加了vagrant ,将%admin ALL=(ALL) ALL,%sudo ALL=(ALL) ALL

root    ALL=(ALL:ALL) ALL
vagrant ALL=(ALL) NOPASSWD: ALL
Defaults:vagrant !requiretty
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD: NOPASSWD: ALL # Allow members of group sudo to execute any command
%sudo ALL=(ALL) NOPASSWD: NOPASSWD: ALL

重新vagrant up显示

 Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant |
vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant The error output from the last command was: stdin: is not a tty
/sbin/mount.vboxsf: mounting failed with the error: No such device

参考了:

Vagrant can't mount shared folder in VirtualBox 4.3.10 #3341

进行更新Ubuntu 14.04的linux-headers,linux-headers更新参考了:UBUNTU内核升级后,kernel headers问题的解决

 sudo apt-get install
cd /usr/src
apt-cache search linux-headers-$(uname -r)
sudo apt-get install linux-headers-$(uname -r)

然后关闭ubuntu 14.04, sudo shutdown -h now

在运行vagrant up,就可以看到virtualbox 更新Virtualbox的增强组件了,欧耶!!

参考链接:

  1. dpkg-reconfigure 重置Ubuntu包依赖

vagrant Ubuntu server 12.04 dpkg: dependency problems prevent configuration of python-gi的更多相关文章

  1. dpkg dependency problems prevent configuration

    dpkg: dependency problems prevent configuration of cr3: cr3 depends on libpng12-0 (>= 1.2.13-4); ...

  2. U盘安装ubuntu server 12.04的问题检测不到CDROM的解决

    U盘安装ubuntu server 12.04的问题检测不到CDROM的解决 ========================== 我是u盘安装ubuntu 14 64Bit 也是出现同样的问题 用u ...

  3. [Linux] Ubuntu Server 12.04 LTS 平台上搭建WordPress(Nginx+MySql+PHP) Part II

    接着上一节继续搭建我们的LNMP平台,接下来我们安装PHP相关的服务 sudo apt-get install php5-cli php5-cgi php5-fpm php5-mcrypt php5- ...

  4. [Linux] Ubuntu Server 12.04 LTS 平台上搭建WordPress(Nginx+MySQL+PHP) Part IV

    接下来我们去下载 WorePress 用最新的 3.7.1 下载地址是:http://cn.wordpress.org/wordpress-3.7.1-zh_CN.zip 我们先建立一个文件夹 /va ...

  5. Ubuntu Server 12.04 静态IP简洁配置

    PS:很长时间没使用Ubuntu了,刚才安装个Ubuntu Server 12.04做测试.Ubuntu的网络设置跟Redhat系是不一样的,配置IP时发现跟以前的Ubuntu桌面版本也有所不同,记录 ...

  6. Ubuntu Server 12.04安装图解教程

                                                                                                Ubuntu S ...

  7. Ubuntu Server 12.04 安装 Jabberd2 服务器

    本篇文章由:http://xinpure.com/install-ubuntu-server-12-04-jabberd2-server/ Ubuntu Server 12.04 安装 Jabberd ...

  8. 安装Drupal7.12+Postgresql9.1(Ubuntu Server 12.04)

    怀揣着为中小企业量身定做一整套开源软件解决方案的梦想开始了一个网站的搭建.http://osssme.org/ OS环境准备 这次是从OS开始安装的.最开始装Ubuntu12.04这里就不再赘述, 唯 ...

  9. 阿里云的ubuntu server 12.04 下安装jdk和tomcat

    因为想自己在做个简单粗暴的小游戏,弄到朋友圈去,买了个阿里云服务,当时选的的ubuntu sever 12.04的os,恰巧朋友又委托一个小项目,所以先尝试搭建下环境. 首先,用putty或者SSH ...

随机推荐

  1. NOIP2010 机器翻译

    1机器翻译 题目背景 小晨的电脑上安装了一个机器翻译软件,他经常用这个软件来翻译英语文章. 题目描述 这个翻译软件的原理很简单,它只是从头到尾,依次将每个英文单词用对应的中文含义来替换.对于每个英文单 ...

  2. C#编程中的66个好习惯,你有多少个?(转)

    http://www.cnblogs.com/jxsoft/archive/2012/01/11/2318824.html

  3. 《Genesis-3D开源游戏引擎完整实例教程-跑酷游戏篇05:二段跳》

    5.二段跳 二段跳概述: 基本跑酷游戏的框架搭建完毕,开发者会根据开发的游戏特性,增设一些额外功能,使游戏具有可玩性性和画面感.下面我们以角色的二段跳为例,来了解在跑酷游戏中增设其它功能的流程.二段跳 ...

  4. php 仿百度文库

    http://www.haosblog.com/?mod=article_read&id=386

  5. 题解西电OJ (Problem 1004 -亚特兰提斯)--最小生成树

    Description 为了找寻沉睡的亚特兰提斯大陆,wm来到了大西洋上进行探险,找了半个月仍一无所获.然而在一次突袭而来的暴风雨后,wm的船莫名地驶入了一片未知的区域,发现了一个地图上未标记的岛屿, ...

  6. HW7.7

    public class Solution { public static void main(String[] args) { double[][] points = { {-1, 0, 3}, { ...

  7. HDU5791--Two (DP)

    题意:两个数列a,b,求相同的子序列有多少对,内容相同位置不同也算不同. 题解:dp[i][j]表示a数列前i个数个 b数列前j个数 有多少对 递推方程: dp[i][j] = dp[i-1][j-1 ...

  8. 字符串匹配算法——KMP算法学习

    KMP算法是用来解决字符串的匹配问题的,即在字符串S中寻找字符串P.形式定义:假设存在长度为n的字符数组S[0...n-1],长度为m的字符数组P[0...m-1],是否存在i,使得SiSi+1... ...

  9. Android实例-操作sqlite数据之自建导航(XE8+小米2)

    相关资料: 源文:http://blog.sina.com.cn/s/blog_77691fb90101g9hh.html help://embarcadero.rs_xe5/rad/Mobile_T ...

  10. MFC版美女找茬

    今天心情:捡了个闲暇. 前几天工作出了个漏洞,电话会议时候怎么都是忽大忽小的声音,实在没听清电话会议的内容,完了依据想象交了一个设计方案,之后便是赋闲. 进入正题,美女找茬实现不难,没有设计上的难度, ...