Ubuntu 13.04安装mysql workbench

  1、如果你没有更换源,是主服务器的官网源,这时候你可以直接用sudo apt-get install mysql-workbench来安装(前提是已经装好mysql相关服务)

  2、如果你第一条装不了,那么看下面这些吧,先去mysql官网下载workbench

             http://dev.mysql.com/downloads/tools/workbench/#downloads 在这里下载deb包,(要先注册一个帐号才能下载)

        3、安装下载完成的包,sudo dpkg -i mysql-workbench-gpl-5.2.47-1ubu1204-amd64 此时出现以下错误

Unpacking mysql-workbench-gpl (from mysql-workbench-gpl-5.2.38-1ubu1104-amd64.deb) ...
dpkg: dependency problems prevent configuration of mysql-workbench-gpl:
mysql-workbench-gpl depends on libzip1 (>= 0.8); however:
Package libzip1 is not installed.
mysql-workbench-gpl depends on python-paramiko; however:
Package python-paramiko is not installed.
mysql-workbench-gpl depends on python-pysqlite2; however:
Package python-pysqlite2 is not installed.

这里你要下载几个依赖包,

  4、下载并安装依赖包

          wget https://launchpad.net/ubuntu/+archive/primary/+files/libzip1_0.9.3-1_i386.deb

      wget http://launchpadlibrarian.net/94563300  /libmysqlclient16_5.1.58-1ubuntu5_i386.deb

    然后执行

sudo dpkg -i libzip1_0.9.3-1_i386.deb
sudo dpkg -i libmysqlclient16_5.1.58-1ubuntu5_i386.deb
sudo apt-get -f install python-paramiko libzip2 libmysqlclient18 mysql-client mysql-common python-pysqlite2 libdbi-perl libdbd-mysql-perl libplrpc-perl libnet-daemon-perl mysql-client
   5、有些系统安装这些就可以了,但有些还会出现两个依赖包未安装
正预备替换 mysql-workbench-gpl 5.2.47-1ubu1204 (使用 mysql-workbench-gpl-5.2.47-1ubu1204-amd64.deb) ...
正在解压缩将用于更替的包文件 mysql-workbench-gpl ...
dpkg: dependency problems prevent configuration of mysql-workbench-gpl:
mysql-workbench-gpl 依赖于 libgtkmm-2.4-1c2a (>= 1:2.24.0);libctemplate0_1.0-1_amd64 然而:
  未安装软件包 libgtkmm-2.4-1c2a。libctemplate0_1.0-1_amd64
这里又要安装两个包
6、去官网把这两个包给下载下来安装
  http://packages.ubuntu.com/precise/amd64/libctemplate0/download
  http://packages.ubuntu.com/precise/amd64/libgtkmm-2.4-1c2a/download
7、安装完这两个包,再重新执行 sudo dpkg -i mysql-workbench-gpl-5.2.47-1ubu1204-amd64 没有报错,OK,在/usr/share/applications 找到workbench,放在菜单栏上
至此workbench全部搞定

在安装软件的时候,经常会遇到这种依赖包,此时很多新手都会崩溃。只要把这些依赖包一个个找到安装上就可以了。先百度一下可以找到相关的人发的包,如果安装后还有依赖包,
那么去ubuntu官网下载,一般都有的,再安装完就可以了。只要心不急,一个一个找也会全找到的,就是麻烦点。

       

posted @ 2013-06-27 15:20  斯世轻尘  阅读(9462)  评论(1编辑  收藏  举报