Zypper

From ICO wiki
Jump to navigationJump to search

Autor

  • Marko Kurs

Sissejuhatus

Zypper on SUSE peal asuv paketihaldus rakendus. Erinevalt samuti SUSE peal asuvast YaST rakendusest on zypperi abil võimalik kiire käsauga pakke paigaldada ja eemaldada. Zypperi käsustiku struktuur on väga sarnane apt-get käsustikuga. Zypper on paketi haldus mootori ZYpp(libzypp) käsurea liides.

Hoidla käitlemine

  • Hoidlate nimekiri
zypper lr
# | Alias                 | Name                  | Enabled | Refresh
--+-----------------------+-----------------------+---------+--------
1 | packman               | Packman 11.1          | Yes     | No
2 | fate                  | fate                  | No      | No
3 | openSUSE-11.1-Updates | Updates for 11.1      | Yes     | Yes
4 | repo-oss              | openSUSE-11.1-Oss     | Yes     | No
5 | repo-non-oss          | openSUSE-11.1-Non-Oss | Yes     | No
6 | repo-debug            | openSUSE-11.1-Debug   | No      | No
  • Lisa hoidla
zypper ar [URL]
# zypper ar http://download.videolan.org/pub/vlc/SuSE/11.1 vlc
Adding repository 'vlc' [done]
Repository 'vlc' successfully added
Enabled: Yes
Autorefresh: No
URI: http://download.videolan.org/pub/vlc/SuSE/11.1


  • Uuenda hoidlate nimekirja
zypper ref
Downloading repository 'Packman 11.1' metadata [done]
Building repository 'Packman 11.1' cache [done]
Downloading repository 'Updates for 11.1' metadata [done]
Building repository 'Updates for 11.1' cache [done]
Repository 'openSUSE-11.1-Oss' is up to date.
All repositories have been refreshed.
  • Eemalda hoidla
zypper rr [hoidla nimi]
Repository 23 not found by alias, number or URI.
Repository foo not found by alias, number or URI.
Removing repository 'repo-debug' [done]
Repository 'repo-debug' has been removed.
Removing repository 'vlc' [done]
Repository 'vlc' has been removed.
  • Hoidlate eksport/import
zypper lr --export [Asukoht]
zypper ar [Asukoht]


Paketti haldus

Otsing

Vaike sättega otsitakse käsuga suvalist paki tüüpi staatust või haoidlat, kui paki nimes on otsitav tekst

# zypper se sqlite
Reading installed packages...

S | Name                     | Summary                                                        | Type
--+--------------------------+----------------------------------------------------------------+--------
  | libapr-util1-dbd-sqlite3 | DBD driver for SQLite 3                                        | package
i | libgda-3_0-sqlite        | Sqlite Provider for GNU Data Access (GDA)                      | package
  | libqt4-sql-sqlite        | Qt 4 sqlite plugin                                             | package
i | libsqlite3-0             | Shared libraries for the Embeddable SQL Database Engine        | package
  | libsqlite3-0-32bit       | Shared libraries for the Embeddable SQL Database Engine        | package
  | mediatomb-sqlite         | UPnP AV MediaServer                                            | package
i | mono-data-sqlite         | Database connectivity for Mono                                 | package
  | pdns-backend-sqlite2     | SQLite 2 backend for pdns                                      | package
  | pdns-backend-sqlite3     | SQLite 3 backend for pdns                                      | package
i | perl-DBD-SQLite          | The DBD::SQLite is a self contained RDBMS in a DBI driver      | package
i | php5-sqlite              | PHP5 Extension Module                                          | package
  | python-sqlite2           | Python bindings for sqlite 2                                   | package
  | qt3-sqlite               | SQLite Database Plug-In for Qt                                 | package
  | rekall-sqlite            | Rekall sqlite Database Backend                                 | package
  | rubygem-sqlite3          | A Ruby interface for the SQLite3 database engine               | package
i | sqlite2                  | Embeddable SQL Database Engine                                 | package
  | sqlite2-32bit            | Embeddable SQL Database Engine                                 | package
  | sqlite2-devel            | Embeddable SQL Database Engine                                 | package
i | sqlite3                  | Embeddable SQL Database Engine                                 | package
  | sqlite3-devel            | Embeddable SQL Database Engine                                 | package
  | sqlite3-tcl              | Tcl binding for SQLite                                         | package
  | tntdb1-sqlite            | Tntdb is a c++-class-library for easy database-access - sqlite | package
  | ulogd-sqlite             | SQLite output plugin for ulogd                                 | package

I täht esimeses tulbas märgib et pakk on juba paigaldatud lokaalsesse arvutisse. Kui soovid näha kõikki paki versioone kasuta --details/-s valikut:

# zypper search -s --match-exact virtualbox-ose
Reading installed packages...

S | Name           | Type    | Version    | Arch   | Repository
--+----------------+---------+------------+--------+------------------------------------
v | virtualbox-ose | package | 1.6.2-2.1  | x86_64 | VirtualBox OSE
i | virtualbox-ose | package | 1.5.6-33.1 | x86_64 | openSUSE-11.1-Oss
v | virtualbox-ose | package | 1.5.6-20.5 | x86_64 | VirtualBox OSE (
v | virtualbox-ose | package | 1.6.2-2.1  | i586   | VirtualBox OSE
v | virtualbox-ose | package | 1.5.6-33.1 | i586   | openSUSE-11.1-Oss
v | virtualbox-ose | package | 1.5.6-20.3 | i586   | VirtualBox OSE

V täht esimeses tulbas märgib, et paki muud versioonid on juba paigaldatud lokaalsele arvutile.

Paigaldus

Pakke saab paigaldada nime järgi:

# zypper install git
Reading installed packages...

The following NEW packages are going to be installed:
  subversion-perl sqlite3 perl-DBD-SQLite git-svn git-cvs git


Overall download size: 1.1 M. After the operation, additional 4.6 M will be used.
Continue? [YES/no]:
Downloading package subversion-perl-1.5.0-96.1.x86_64 (1/6), 950.0 K (4.1 M unpacked)
Downloading: subversion-perl-1.5.0-96.1.x86_64.rpm [done]
Installing: subversion-perl-1.5.0-96.1 [done]
Downloading package sqlite3-3.5.7-17.1.x86_64 (2/6), 30.0 K (40.0 K unpacked)
Downloading: sqlite3-3.5.7-17.1.x86_64.rpm [done]
Installing: sqlite3-3.5.7-17.1 [done]
Downloading package perl-DBD-SQLite-1.14-41.1.x86_64 (3/6), 44.0 K (103.0 K unpacked)
Downloading: perl-DBD-SQLite-1.14-41.1.x86_64.rpm [done]
Installing: perl-DBD-SQLite-1.14-41.1 [done]
Downloading package git-svn-1.5.4.5-26.1.x86_64 (4/6), 66.0 K (195.0 K unpacked)
Downloading: git-svn-1.5.4.5-26.1.x86_64.rpm [done]
Installing: git-svn-1.5.4.5-26.1 [done]
Downloading package git-cvs-1.5.4.5-26.1.x86_64 (5/6), 63.0 K (205.0 K unpacked)
Downloading: git-cvs-1.5.4.5-26.1.x86_64.rpm [done]
Installing: git-cvs-1.5.4.5-26.1 [done]
Downloading package git-1.5.4.5-26.1.x86_64 (6/6), 10.0 K (3.0 K unpacked)
Downloading: git-1.5.4.5-26.1.x86_64.rpm [done]
Installing: git-1.5.4.5-26.1 [done]

Võimaluste järgi mida nad pakuvad:

# zypper in MozillaFirefox \< 3
Reading installed packages...
'MozillaFirefox' providing 'MozillaFirefox<3' is already installed.
Nothing to do.
# zypper in MozillaFirefox \>= 3
Reading installed packages...

The following packages are going to be upgraded:
  mozilla-xulrunner190-translations MozillaFirefox mozilla-xulrunner190-gnomevfs
mozilla-xulrunner190 MozillaFirefox-translations


The following package is going to be REMOVED:
  mozilla-xulrunner190-lang


Overall download size: 11.0 M. After the operation, 12.9 M will be freed.
Continue? [Y/n/p/?]:
# zypper in 'libqtiff.so()(64bit)'
Reading installed packages...
'libqt4-x11' providing 'libqtiff.so()(64bit)' is already installed.
Nothing to do.

Muud näited:

zypper in yast*                     # Paigalda kõik yast moodulid
zypper in -t pattern lamp_server    # Paigalda lamp_server pattern (Pakid mis on vajalikub LAMP serverile)
zypper in emacs pattern:lamp_server # Paigalda emacs pakk ja lamp_server pattern
zypper in vim -emacs                # Paigalda vim ja eemalda emacs ühe käsuga
zypper in amarok packman:libxine1   # Paigalda libxine1 packman hoidlast ja amarok suvalisest hoidlast
zypper in bitchx-1.1-81.x86_64.rpm  # Paigalda bitchx rpm kohalikult kettalt
zypper in -f subversion             # subversion sund taaspaigaldus

Eemaldus

Eemaldus käsk on väga sarnane paigaldus käsuga

# zypper remove sqlite
Reading installed packages...

The following packages are going to be REMOVED:
  sqlite3 perl-DBD-SQLite git-cvs git


After the operation, 351.0 K will be freed.
Continue? [YES/no]: n

Uuendus

zypper up                           # Uuenda kõik paigaldatud pakid uusimale versioonile
zypper up libzypp zypper            # Uuenda libzypp ja zypper
zypper in sqlite3                   # Uuenda sqlite3 või paigalda see kui ei ole juba paigaldatud

Lisainfo

Allikad