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. MFC中Listbox控件的简单使用

    MFC中listbox控件是为了显示一系列的文本,每个文本占一行.   Listbox控件可以设置属性为: LBS_CHILD   :(默认)子窗口 LBS_Visible :(默认)可视 LBS_M ...

  2. 命令rm

    mv -r 递归删除文件夹内所有东西mv -i 交互式删除mv -f 强制删除,没有警告提示

  3. JDBC注册驱动的三种方式

    JDBC注册驱动的三种方式 1.通过导入的JDBC的驱动包拿到的com.mysql.jdbc.Driver对象,利用java.sql.DriverManager对象的DriverManager.reg ...

  4. Memcached使用笔记

    1.linux启动memcached命令 进入到memcached安装目录,可以用whereis memcached查看,默认安装在/usr/bin/目录下 输入以下命令,下面两行任选一行就可以了 m ...

  5. Handlebar

    1.Handlebar中文网: http://www.ghostchina.com/introducing-the-handlebars-js-templating-engine/ 2.http:// ...

  6. 【STL源码学习】STL算法学习之四

    排序算法是STL算法中相当常用的一个类别,包括部分排序和全部排序算法,依据效率和应用场景进行选择. 明细: sort 函数原型: template <class RandomAccessIter ...

  7. 火狐对innerHtml的支持问题

    最新的Firefox是支持innerHTML的,但是不支持innerText.解决办法是将innerText换成textContent. $.getJSON("/api/Articles&q ...

  8. android常见错误-

    将library中的报错项删除,然后点击[add]正确的appcompat

  9. C++文件读写(转载)

    原网页地址:http://blog.csdn.net/kingstar158/article/details/6859379 下文全部转载自以上网页,感谢原作者的贡献. 在看C++编程思想中,每个练习 ...

  10. Android 设置横屏或竖屏

    方法一:在AndroidManifest.xml中配置 如果不想让软件在横竖屏之间切换,最简单的办法就是在项目的AndroidManifest.xml中找到你所指定的activity中加上androi ...