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. 为zend studio增加Extjs代码提示功能

    http://blog.163.com/liuhaijun_83/blog/static/61175622201223114216786/ 需要将其中的http://www.spket.com/upd ...

  2. BNUOJ-26579 Bread Sorting YY

    题目链接:http://www.bnuoj.com/bnuoj/problem_show.php?pid=26579 考虑两个性质:蚂蚁的相对位置不变,蚂蚁碰撞时相当于对穿而过,然后排两次序就可以了. ...

  3. centos修改时区,设置时间

    在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况.如果没有安装,而你使用的是 CentOS系统 那使用命令 yum insta ...

  4. sublime text2注册码

    ----- BEGIN LICENSE ----- Andrew Weber Single User License EA7E-855605 813A03DD 5E4AD9E6 6C0EEB94 BC ...

  5. hdu 1034 Candy Sharing Game

    Candy Sharing Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Other ...

  6. $().each 和 $.each() 两个方法的区别

    在jquery中,遍历对象和数组,经常会用到$().each和$.each(),两个方法.两个方法是有区别的,从而这两个方法在针对不同的操作上,显示了各自的特点. $().each,对于这个方法,在d ...

  7. CSS构造模型

    div 边距 边框 定位 浮动 21.1 div 部分(division)---<div>元素,经常以div形式引用---是XHTML元素,用于定义XHTML文件中的区域. 1.添加div ...

  8. CSS边框与边界

    (上右下左依次体现)à边框的同一属性名称可以同时使用多个属性值 简化方案:border: 长度 形态 颜色 例如 border:1px solid black; 16.2 CSS中边界的使用 padd ...

  9. bzoj 1064【noi2008】假面舞会

    题意:http://www.lydsy.com/JudgeOnline/problem.php?id=1064 给一个有向图染色,每个点的后继必须相同,问至少&至多有多少种染色方案 sol: ...

  10. 解决MVC Jquery"此请求已被阻止,因为当用在 GET 请求中时,会将敏感信息透漏给第三方网站"的问题

    在ASP.NET MVC项目中,使用AJAX向控制器发送GET请求获取JSON数据时,出现这个错误:"此请求已被阻止,因为当用在 GET 请求中时,会将敏感信息透漏给第三方网站.若要允许 G ...