SmartPackageManager
跳到导航
跳到搜索
什么是智能包管理器
Smart Package Manager 是一个致力于解决软件安装与升级问题的方案。它支持多种安装包格式,如 APT, APT-RPM, YUM, URPMI,等等。你甚至可以把你的源建立在一个可移动设备上,如你的移动硬盘。当然 Smart Package Manager 最诱人的优点是:
- 智能解决软件包的依赖问题
- 多线程下载
- 自动从不同的源中选择网速最快的下载
如何安装智能包管理器
Magic Linux 2.0 已经支持了智能包管理器。对于低版本的用户,请升级到 Magic Linux 2.0
如何使用智能包管理器
如何重构智能包管理器的源
由于 Magic Linux 版本的更新,您的系统可能需要使用新的软件包仓库。这时,您需要重构智能包管理器的源。
请您检查一下以下两个信息:
- 您的 Magic Linux 的版本信息。(2.0 final)
- 您想使用的 GNOME 的版本信息。(2.10/2.12)
根据以上信息,使用以下对应的脚本:
Magic Linux 2.0 final + GNOME 2.12
cat << END > rebuild-channels-smart.sh #!/bin/bash # Usage : This script will rebuild the channels of the smart package manager. smart channel --remove-all -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Os Repository" \ baseurl=http://apt.magiclinux.org/magiclinux \ components=os -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Os Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0-g12 \ components=os -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Updates Repository" \ baseurl=http://apt.magiclinux.org/magiclinux \ components=updates -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Updates Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0-g12 \ components=updates -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Gnome Repository" \ baseurl=http://apt.magiclinux.org/magiclinux \ components=gnome -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Gnome Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0-g12 \ components=gnome -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Extras Repository" \ baseurl=http://apt.magiclinux.org/magiclinux \ components=extras -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Extras Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0-g12 \ components=extras -y smart channel --disable [email protected] smart channel --disable [email protected] smart update END sh rebuild-channels-smart.sh
Magic Linux 2.0 final + GNOME 2.10
cat << END > rebuild-channels-smart.sh #!/bin/bash # Usage : This script will rebuild the channels of the smart package manager. smart channel --remove-all -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Os Repository" \ baseurl=http://apt.magiclinux.org/magiclinux \ components=os -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Os Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0 \ components=os -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Updates Repository" \ baseurl=http://apt.magiclinux.org/magiclinux \ components=updates -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Updates Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0 \ components=updates -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Gnome Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0 \ components=gnome -y smart channel --add [email protected] type=apt-rpm \ name="Magic Linux 2.0 APT Extras Repository" \ baseurl=http://auvtech.com/~xinzhen/downloads/apt/magic-2-0 \ components=extras -y smart update END sh rebuild-channels-smart.sh
控制台命令的使用
本条目尚未完全完成,我们需要您的参与!
图形界面的使用
- 1. 如何打开图形界面。
- 方法一:打开菜单 “系统” -> “智能包管理器(Smart Package Manager)”
- 方法二:在 KDE 或 GNOME 终端程序中输入命令“ smart --gui ”
- 2. 如何设置源。( 这里我们只讲述 APT-RPM 源的设置方法,对于其它格式,请查阅 Smart Package Manager 的主页 )
- 打开 Smart 菜单,选择 “编辑” -> “源”。
- 先把选择 类型 为 “apt-rpm” 的源,然后点击下方的 删除 键删除之。重复此步骤,删除所有 “apt-rpm” 源为止。
- 在“源”的对话框中,选择 “新建”;然后再选择 “提供源信息”。
- 选择新源的类型为 APT-GET 仓库
- 在 “编辑源” 的对话框中,添加源的信息。相关信息请查看 Magic Linux 数据源列表。
- 以上四步都完成以后,你可以在 “源” 对话框中看到你新添加的数据源了。
- 3. 软件包的更新。
- 首先,打开 Smart 菜单,选择 “文件” -> “更新源” 或 “更新选定的源”。
- 然后选择菜单 “编辑” -> “升级全部”
- 4. 软件包的安装。
Magic Linux 数据源列表
为了解决软件包在依赖上的冲突和兼顾 Magic Linux 与 Gnome 的开发周期的差异,我们使用了不同的数据源来进行区分。
如果你需要安装 Gnome 2.12,而你正在使用的 Magic Linux 版本是 2.0,那么,你应该使用“Magic Linux 2.0 + Gnome 2.12” 的设置。
Magic Linux 2.0 + Gnome 2.12
- 名称:Magic Linux 2.0 & Gnome 2.12
- 基本网址(1):http://apt.magiclinux.org/magiclinux
- 基本网址(2):http://auvtech.com/~xinzhen/downloads/apt/magic-2-0-g12
- 组件:gnome updates extras os
Magic Linux 2.0 + Gnome 2.10
- 名称:Magic Linux 2.0 & Gnome 2.10
- 基本网址:http://auvtech.com/~xinzhen/downloads/apt/magic-2-0
- 组件:gnome extras os
更多的使用途径
把本地路径设为源
有很多朋友都喜欢用下载软件把仓库的软件包下载到本地目录中,但如何安装这些软件包呢?
Smart Package Manager 为我们提供了本地源的功能,我们可以使用这个功能大大地简化安装与升级软件包的难度。
具体步骤如下:
- 了解你的本地软件包放置的目录的路径,可以通过 pwd 命令得到当前路径的方法取得。
- 使用 root 用户运行使用 smart --gui 命令或打开“智能包管理器”菜单项。
- 打开“源”对话框:打开菜单“编辑”->“源”
- 添加新源:“新建”->“提供源信息”->“RPM 目录”
- 填写源信息:
- 别名:源的简单定义,这是自己命名的。
- 名称:源的详细定义,这也是自己命名的。
- 优先级:优先级越高,这个源的软件包就会优先考虑
- 目录路径:你的本地软件包放置的目录路径
- 最后选择“确定”完成设置。
这种方法对于想升级 KDE,但又不知道应该安装哪个软件包的情况很有帮助。