Skip navigation.

crocodile's blog

a python lover

Posts tagged with "ubuntu"

Ubuntu下使用新立得软件包管理器添加删除软件

新立得软件包管理器起源于Debian。它是dpkg命令的图形化前端,或者说是前端 软件套件管理工具。与之类似的工具有很多:终端上有dselect、feta、 aptitude、wajig等;KDE上有Kpackage、adept等;gnome上有gnome-apt、red carpet、stormpkg以及synaptic。最成功也最方便的当然就是GTK2的synaptic和QT的adept。gnome下的软件安装 完全可以不用apt,新立得可以完成所有的工作。
它可以完全使用图形菜单完成Linux软件的安装、删除、升级等工作,相当方便。而且在Gnome中还提供了两种图形化前端工具,一个是应用程序-添加/删除程序,另一个是系统-系统设置-新立得软件包管理器。
添加/删除程序提供了更多、更详细的说明,并且有和应用程序菜单相对应的软件分类,和漂亮直观的图标显示。使一般用户也可以轻松使用。提供添加,删除程序的功能。
添加/删除程序

而新立得软件包管理器看起来似乎更专业,不但有软件包的管理,还提供系统升级的功能。ubuntu系统的update就是新立得下面的一个小小的工具。虽然没有图片,而且大部分提示是英文的,但是这仍是所有电脑菜鸟必备的软件安装、卸载工具。
新立得软件包管理器

在新立得里细心寻找就可以发现宝藏,比如realplayer 10,adobe reader 7, crossover office 5,不用到网络上去搜索下载,它就呆在你的安装源里。并且,它还提供了强大的搜索功能,可以搜索软件名称、软件注释、软件介绍关键词来想办法找到你需要的 软件。

ubuntu软件包管理器词汇表

apt: The 'Advanced Package Tool', the program on which Ubuntu's Package Managers are based. apt handles the more complicated parts of package management, such as maintaining a database of packages.

apt:Advanced Package Tool(高级软件包工具),Ubuntu系统包管理器基本程序。apt处理软件包管理的较复杂部分,例如维护一个数据库包。

Architecture: The type of processor the computer uses is referred to as its architecture.

Architecture:计算机所用处理器的类型决定它的架构。

Binary Package: A package which contains a program suitable for one particular architecture.

Binary Package:包含适合一个特定架构的程序的软件包。

deb: A .deb file is an Ubuntu (or Debian) package, which contains all of the files which the package will install.

deb:一个.deb文件就是一个包含软件包将要安装的全部文件的Ubuntu(或Debian)包。

Dependency: A dependency is a package which must be installed for another package to work properly.

Dependency:依赖是为另一个软件包正常工作而必须安装的一个软件包。

Package Manager: A program which handles packages, allowing you to search, install and remove them.

Package Manager:一个处理软件包程序,允许你查找,安装和删除包。

Repository/Software Channel: A location from which packages of a similar type are available to download and install.

Repository/Software Channel:一个可用于下载和安装的,类似于包类型的位置。

Source Package: A package which contains the original code for a program, which must be compiled to be usable on a particular architecture.

Source Package:一个包含程序原始代码的包,必须针对特定的架构进行编译才可用。

dpkg用法

最常用的就是-i,-r。简单,安装/卸载。不用说。
下面简单介绍最常用,也最好用的4种命令参数。也好记,L,l,S,s。大小L和大小S。
-------------------------------
dpkg -L|--listfiles <软件包名> ... 列出所有“属于”该软件包(或多个软件包) 的文件
相当与synaptic的看包属性:
~$ dpkg -L gcc-3.4|head -n 5
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/gcc-3.4-base
-------------------------------
dpkg -l|--list [<表达式> ... 简明地列出软件包的状态
查找包,使用表达式,方便很多
$ dpkg -l gcc*
期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 当前状态=未(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)
|/ 错误?=(无)/保持(?)/须重装(R)/两者兼有(#) (状态,错误:大写=故障)
||/ 名称 版本 简介
+++-==============-==============-============================================
ii gcc 3.3.5-1 The GNU C compiler
un gcc-2.95 <无> (无相关介绍)
un gcc-3.2 <无> (无相关介绍)
ii gcc-3.3 3.3.5-8ubuntu2 The GNU C compiler
ii gcc-3.3-base 3.3.5-8ubuntu2 The GNU Compiler Collection (base package)
un gcc-3.3-doc <无> (无相关介绍)
ii gcc-3.4 3.4.3-9ubuntu4 The GNU C compiler
ii gcc-3.4-base 3.4.3-9ubuntu4 The GNU Compiler Collection (base package)
un gcc-3.4-doc <无> (无相关介绍)
un gcc-3.5-base <无> (无相关介绍)
ii gcc-4.0-base 4.0.0-7ubuntu6 The GNU Compiler Collection (base package)
un gcc-doc <无> (无相关介绍)
-------------------------------
dpkg -S|--search <表达式> ... 搜寻拥有该文件(或多个文件)的软件包
由单个(多个)文件回溯找包:
$ dpkg -S /usr/share/doc/gcc-3.4-base/FAQ.gz
gcc-3.4: /usr/share/doc/gcc-3.4-base/FAQ.gz

链接也可以自动处理。
$ ls -l /usr/bin/ppp*
lrwxrwxrwx 1 root root 15 2005-09-17 01:11 /usr/bin/pppoeci -> eciadsl-pppoeci

$ dpkg -S /usr/bin/pppoeci
eciadsl-usermode: /usr/bin/pppoeci
-------------------------------
dpkg -s|--status <软件包名> ... 显示软件包详尽的状态信息
相当于synaptic看依赖关系。
$ dpkg -s gcc-3.4
Package: gcc-3.4
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 4404
Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Version: 3.4.3-9ubuntu4
Provides: c-compiler
Depends: gcc-3.4-base (>= 3.4.3-9ubuntu4), libgcc1 (>= 1:3.4.3-9ubuntu4), libc6 (>= 2.3.2.ds1-4), cpp-3.4 (>= 3.4.3-9ubuntu4), cpp-3.4 (<< 3.4.5), binutils (>= 2.15-5)
Recommends: libc6-dev (>= 2.3.2.ds1-16)
Suggests: gcc-3.4-doc (>= 3.4.3-9ubuntu4), amd64-libs-dev
Conflicts: gcc-3.2 (<= 1:3.2.3-0pre8)
Description: The GNU C compiler
This is the GNU C compiler, a fairly portable optimizing compiler for C.
.
ABIs changed between gcc-3.3 and gcc-3.4 on some architectures (hppa, m68k,
mips, mipsel, sparc). Please read /usr/share/doc/gcc-3.4/README.Debian
for more details.

apt dpkg 命令说明

To update the local cache from apt repositories

apt-get update

To download and install a package (including dependencies):

apt-get install package-name

To install a single .deb package:

dpkg --install package.deb

To remove a package:

apt-get remove package-name

To find all available packages that match a pattern:apt-cache searches the package names and descriptions.

apt-cache search pattern

To display package information:

apt-cache show package-name

To show all installed packages:

dpkg --list

To show all files that belong to a package:

dpkg --listfile package-name

ubuntu设置c开发环境

,

ubuntu搭建c开发环境

apt-get install build-essential

apt-get install manpages-dev
(这样可以使用man命令在Linux Programmer's Manual中查看fork等函数的帮助了)
December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31