Opensuse как установить rpm пакет
Software installation is generally incredibly easy on openSUSE. There’s a package manager, which lets you install and remove packages very easily — it’s comparable to the app stores found on many modern smart phones.
Simply open YaST Software Management.
Your web browser does not support the HTML5 video element and/or Ogg Theora format.
Try Firefox, Konqueror or Opera.
Now search for the package you want, select it for installation and click Accept. The package manager will then fetch the RPM package from your configured software repositories — and install it including any dependencies. After installation is complete the application should appear in the launch menu (unless it’s a command line program).
![]() |
The availability of software packages in the package manager depends on the configured software repositories. Read about software repositories in the next chapter. |
When browsing openSUSE related websites, you’re likely to come across buttons such as this one:
1-click installation (also referred to as «Direct Install») simply automates the process of adding one or more software repositories to the package manager and installing one or more RPM packages. Therefore 1-click installation should be used with the same care as manually adding unofficial repositories (see the next chapter for more on software repositories).
Most users will find everything they need and more in the package manager — especially if a few additional software repositories are added (see next chapter). But not all software is packaged and provided via repositories, and non-free software usually can’t be legally redistributed via the package manager because of license restrictions.
In these cases you’ll need to go to the developer/vendor website and download and install the software manually — but always look for an openSUSE package in repositories first — and make sure you only download and install software from trusted sources.
![]() |
Only install RPM files that are built specifically for (your version of) openSUSE. |
The tarball might contain binaries that just need to be run, or it might contain source code which needs to be compiled to run on your system — this can be very complicated, and requires you to first install various developer tools. There’s no one standard way to install tarball content, but instructions should always be included in the tarball in files called INSTALL, README or similar — or you should be able to find installation instructions on the website where you downloaded the tarball.
If you wish, you can install and remove packages via a terminal too.
To search for a package run zypper search [search term]. Example:
You can get a lot of useful information about installed packages from the RPM database very easily.
Opensuse как установить rpm пакет
Установка программного обеспечения обычно не вызывает никаких проблем в openSUSE. Имеется менеджер пакетов, позволяющий легко устанавливать и удалять пакеты. Это похоже на магазины прикладных программ для современных смартфонов.
Просто откройте «Управление программным обеспечением» в YaST.
Ваш браузер не поддерживает видеоэлемент HTML5 и/или формат Ogg Theora.
Воспользуйтесь Firefox, Konqueror или Opera.
Произведите поиск требуемого пакета, выберите его для установки и нажмите «Принять». После этого менеджер пакетов получит RPM-пакет из настроенных репозиториев и установит его, включая зависимости. По завершении установки программа появится в меню запуска (если только она не предназначена для командной строки).
![]() |
Доступность пакетов программного обеспечения в менеджере пакетов зависит от настроенных репозиториев программного обеспечения. См. следующий раздел о репозиториях программного обеспечения. |
На сайтах, связанных с openSUSE, нередко можно увидеть кнопки, похожие на вот эту:
Установка в один клик (или «прямая установка») — это просто автоматический процесс добавления одного или нескольких репозиториев программного обеспечения и установки одного или нескольких RPM-пакетов. Поэтому при установке в один клик следует соблюдать осторожность, как и при ручном добавлении неофициальных репозиториев (см. следующий раздел о репозиториях программного обеспечения).
Большинству пользователей будет достаточно того, что предоставляет менеджер пакетов, особенно если добавить пару дополнительных репозиториев программного обеспечения (см. следующий раздел). Но не все программы предоставляются в виде пакетов через репозитории, а несвободное программное обеспечение, как правило, нельзя легально распространять через менеджер пакетов из-за лицензионных ограничений.
В подобных случаях необходимо обращаться к сайту разработчика/поставщика и скачивать и устанавливать программное обеспечение вручную, но обязательно сначала следует поискать пакет в репозиториях openSUSE и скачивать и устанавливать программное обеспечение только из надёжных источников.
![]() |
Устанавливайте только те RPM-файлы, которые собраны для вашей конкретной версии openSUSE. |
Архив может содержать выполняемые двоичные файлы, а может содержать исходный код, требующий компиляции для запуска на вашей системе, что может быть довольно сложным и потребовать установку инструментов разработчика. Не существует одного стандартного способа установки содержимого tar-архива, но инструкции всегда можно найти в файлах с названиями INSTALL, README и т .п. или на сайте, откуда скачан tar-архив.
При желании устанавливать и удалять пакеты можно через терминал.
Команда для поиска пакета: zypper search [слово поиска]. Пример:
Вы можете легко получить много полезной информации об установленных пакетах из базы данных RPM.
Opensuse как установить rpm пакет
This chapter describes Zypper and RPM, two command line tools for managing software. For a definition of the terminology used in this context (for example, repository , patch , or update ) refer to Book “Start-Up”, Chapter 9 “Installing or removing software”, Section 9.1 “Definition of terms” .
2.1 Using Zypper #Edit source
Zypper is a command line package manager for installing, updating, and removing packages. It also manages repositories. It is especially useful for accomplishing remote software management tasks or managing software from shell scripts.
2.1.1 General usage #Edit source
The general syntax of Zypper is:
The components enclosed in brackets are not required. See zypper help for a list of general options and all commands. To get help for a specific command, type zypper help COMMAND.
The simplest way to execute Zypper is to type its name, followed by a command. For example, to apply all needed patches to the system, use:
Additionally, you can choose from one or more global options by typing them immediately before the command:
In the above example, the option —non-interactive means that the command is run without asking anything (automatically applying the default answers).
To use options that are specific to a particular command, type them immediately after the command:
In the above example, —auto-agree-with-licenses is used to apply all needed patches to a system without you being asked to confirm any licenses. Instead, licenses will be accepted automatically.
Some commands require one or more arguments. For example, when using the command install , you need to specify which package or which packages you want to install :
Some options also require a single argument. The following command will list all known patterns:
You can combine all of the above. For example, the following command will install the mc and vim packages from the factory repository while being verbose:
The —from option keeps all repositories enabled (for solving any dependencies) while requesting the package from the specified repository. —repo is an alias for —from , and you may use either one.
Most Zypper commands have a dry-run option that does a simulation of the given command. It can be used for test purposes.
Zypper supports the global —userdata STRING option. You can specify a string with this option, which gets written to Zypper’s log files and plug-ins (such as the Btrfs plug-in). It can be used to mark and identify transactions in log files.
2.1.2 Using Zypper subcommands #Edit source
Zypper subcommands are executables that are stored in the directory specified by the zypper_execdir configuration option. It is /usr/lib/zypper/commands by default. If a subcommand is not found there, Zypper automatically searches the rest of your $PATH locations for it. This lets you create your own local extensions and store them in user space.
Executing subcommands in the Zypper shell, and using global Zypper options are not supported.
List your available subcommands:
View the help screen for a subcommand:
2.1.3 Installing and removing software with Zypper #Edit source
To install or remove packages, use the following commands:
Warning: Do not remove mandatory system packages
Do not remove mandatory system packages like glibc , zypper , kernel . If they are removed, the system can become unstable or stop working altogether.
2.1.3.1 Selecting which packages to install or remove #Edit source
There are various ways to address packages with the commands zypper install and zypper remove .
Where mozilla is the alias of the repository from which to install.
By package name using wild cards
You can select all packages that have names starting or ending with a certain string. Use wild cards with care, especially when removing packages. The following command will install all packages starting with “ Moz ” :
Tip: Removing all -debuginfo packages
When debugging a problem, you sometimes need to temporarily install a lot of -debuginfo packages which give you more information about running processes. After your debugging session finishes and you need to clean the environment, run the following:
For example, to install a package without knowing its name, capabilities come in handy. The following command will install the package MozillaFirefox :
Together with a capability, you can specify a hardware architecture and a version:
The name of the desired hardware architecture is appended to the capability after a full stop. For example, to specify the AMD64/Intel 64 architectures (which in Zypper is named x86_64 ), use:
Versions must be appended to the end of the string and must be preceded by an operator: < (lesser than), <= (lesser than or equal), = (equal), >= (greater than or equal), > (greater than).
You can also combine a hardware architecture and version requirement:
You can also specify a local or remote path to a package:
2.1.3.2 Combining installation and removal of packages #Edit source
To install and remove packages simultaneously, use the +/- modifiers. To install emacs and simultaneously remove vim , use:
To remove emacs and simultaneously install vim , use:
To prevent the package name starting with the — being interpreted as a command option, always use it as the second argument. If this is not possible, precede it with — :
2.1.3.3 Cleaning up dependencies of removed packages #Edit source
If (together with a certain package), you automatically want to remove any packages that become unneeded after removing the specified package, use the —clean-deps option:
2.1.3.4 Using Zypper in scripts #Edit source
By default, Zypper asks for a confirmation before installing or removing a selected package, or when a problem occurs. You can override this behavior using the —non-interactive option. This option must be given before the actual command ( install , remove , and patch ), as can be seen in the following:
This option allows the use of Zypper in scripts and cron jobs.
2.1.3.5 Installing or downloading source packages #Edit source
To install the corresponding source package of a package, use:
When executed as root , the default location to install source packages is /usr/src/packages/ and
/rpmbuild when run as user. These values can be changed in your local rpm configuration.
This command will also install the build dependencies of the specified package. If you do not want this, add the switch -D :
To install only the build dependencies use -d .
Of course, this will only work if you have the repository with the source packages enabled in your repository list (it is added by default, but not enabled). See Section 2.1.6, “Managing repositories with Zypper” for details on repository management.
A list of all source packages available in your repositories can be obtained with:
You can also download source packages for all installed packages to a local directory. To download source packages, use:
The default download directory is /var/cache/zypper/source-download . You can change it using the —directory option. To only show missing or extraneous packages without downloading or deleting anything, use the —status option. To delete extraneous source packages, use the —delete option. To disable deleting, use the —no-delete option.
2.1.3.6 Installing packages from disabled repositories #Edit source
Normally you can only install or refresh packages from enabled repositories. The —plus-content TAG option helps you specify repositories to be refreshed, temporarily enabled during the current Zypper session, and disabled after it completes.
For example, to enable repositories that may provide additional -debuginfo or -debugsource packages, use —plus-content debug . You can specify this option multiple times.
To temporarily enable such ‘debug’ repositories to install a specific -debuginfo package, use the option as follows:
The build-id string is reported by gdb for missing debuginfo packages.
Note: Disabled installation media
Repositories from the openSUSE Leap installation media are still configured but disabled after successful installation. You can use the —plus-content option to install packages from the installation media instead of the online repositories. Before calling zypper , ensure the media is available, for example by inserting the DVD into the computer’s drive.
2.1.3.7 Utilities #Edit source
To verify whether all dependencies are still fulfilled and to repair missing dependencies, use:
In addition to dependencies that must be fulfilled, some packages “ recommend ” other packages. These recommended packages are only installed if actually available and installable. In case recommended packages were made available after the recommending package has been installed (by adding additional packages or hardware), use the following command:
This command is very useful after plugging in a Web cam or Wi-Fi device. It will install drivers for the device and related software, if available. Drivers and related software are only installable if certain hardware dependencies are fulfilled.
2.1.4 Updating software with Zypper #Edit source
There are three different ways to update software using Zypper: by installing patches, by installing a new version of a package or by updating the entire distribution. The latter is achieved with zypper dist-upgrade . Upgrading openSUSE Leap is discussed in Book “Start-Up”, Chapter 12 “Upgrading the system and system changes” .
2.1.4.1 Installing all needed patches #Edit source
Patching openSUSE Leap is the most reliable way to install new versions of installed packages. It guarantees that all required packages with correct versions are installed and ensures that package versions considered as conflicting are omitted.
To install all officially released patches that apply to your system, run:
All patches available from repositories configured on your computer are checked for their relevance to your installation. If they are relevant (and not classified as optional or feature ), they are installed immediately. If zypper patch succeeds, it is guaranteed that no vulnerable version package is installed unless you confirm the exception.
If a patch that is about to be installed includes changes that require a system reboot, you will be warned before.
The plain zypper patch command does not apply patches from third party repositories. To update also the third party repositories, use the with-update command option as follows:
To install also optional patches, use:
To install all patches relating to a specific Bugzilla issue, use:
To install all patches relating to a specific CVE database entry, use:
For example, to install a security patch with the CVE number CVE-2010-2713 , execute:
To install only patches which affect Zypper and the package management itself, use:
Bear in mind that other command options that would also update other repositories will be dropped if you use the updatestack-only command option.
2.1.4.2 Listing patches #Edit source
To find out whether patches are available, Zypper allows viewing the following information:
To list the number of needed patches (patches that apply to your system but are not yet installed), use patch-check :
This command can be combined with the —updatestack-only option to list only the patches which affect Zypper and the package management itself.
List of needed patches
To list all needed patches (patches that apply to your system but are not yet installed), use zypper list-patches .
List of all patches
To list all patches available for openSUSE Leap , regardless of whether they are already installed or apply to your installation, use zypper patches .
It is also possible to list and install patches relevant to specific issues. To list specific patches, use the zypper list-patches command with the following options:
To list all needed patches that relate to Bugzilla issues, use the option —bugzilla .
To list patches for a specific bug, you can also specify a bug number: —bugzilla=NUMBER . To search for patches relating to multiple Bugzilla issues, add commas between the bug numbers, for example:
To list all needed patches that relate to an entry in the CVE database (Common Vulnerabilities and Exposures), use the option —cve .
To list patches for a specific CVE database entry, you can also specify a CVE number: —cve=NUMBER . To search for patches relating to multiple CVE database entries, add commas between the CVE numbers, for example:
The above patch conflicts with the affected or vulnerable versions of 22 packages. If any of these affected or vulnerable packages are installed, it triggers a conflict, and the patch is classified as needed . zypper patch tries to install all available patches. If it encounters problems, it reports them, thus informing you that not all updates are installed. The conflict can be resolved by either updating the affected or vulnerable packages or by removing them. Because SUSE update repositories also ship fixed packages, updating is a standard way to resolve conflicts. If the package cannot be updated—for example, because of dependency issues or package locks—it is deleted after the user’s approval.
To list all patches regardless of whether they are needed, use the option —all additionally. For example, to list all patches with a CVE number assigned, use:
2.1.4.3 Installing new package versions #Edit source
If a repository contains only new packages, but does not provide patches, zypper patch does not show any effect. To update all installed packages with newer available versions, use the following command:
Important
zypper update ignores problematic packages. For example, if a package is locked, zypper update omits the package, even if a higher version of it is available. Conversely, zypper patch reports a conflict if the package is considered vulnerable.
To update individual packages, specify the package with either the update or install command:
A list of all new installable packages can be obtained with the command:
Note that this command only lists packages that match the following criteria:
has the same vendor like the already installed package,
is provided by repositories with at least the same priority than the already installed package,
is installable (all dependencies are satisfied).
A list of all new available packages (regardless whether installable or not) can be obtained with:
To find out why a new package cannot be installed, use the zypper install or zypper update command as described above.
2.1.4.4 Identifying orphaned packages #Edit source
Whenever you remove a repository from Zypper or upgrade your system, some packages can get in an “ orphaned ” state. These orphaned packages belong to no active repository anymore. The following command gives you a list of these:
With this list, you can decide if a package is still needed or can be removed safely.
2.1.5 Identifying processes and services using deleted files #Edit source
When patching, updating, or removing packages, there may be running processes on the system which continue to use files having been deleted by the update or removal. Use zypper ps to list processes using deleted files. In case the process belongs to a known service, the service name is listed, making it easy to restart the service. By default zypper ps shows a table:
| PID : ID of the process |
| PPID : ID of the parent process |
| UID : ID of the user running the process |
| Login : Login name of the user running the process |
| Command : Command used to execute the process |
| Service : Service name (only if command is associated with a system service) |
| Files : The list of the deleted files |
The output format of zypper ps can be controlled as follows:
Create a short table not showing the deleted files.
Show only processes associated with a system service.
Only show system services using deleted files.
Show the commands to retrieve status information for services which might need a restart.
For more information about service handling refer to Chapter 10, The systemd daemon.
2.1.6 Managing repositories with Zypper #Edit source
All installation or patch commands of Zypper rely on a list of known repositories. To list all repositories known to the system, use the command:
The result will look similar to the following output:
Example 2.1: Zypper—list of known repositories #
When specifying repositories in various commands, an alias, URI or repository number from the zypper repos command output can be used. A repository alias is a short version of the repository name for use in repository handling commands. Note that the repository numbers can change after modifying the list of repositories. The alias will never change by itself.
By default, details such as the URI or the priority of the repository are not displayed. Use the following command to list all details:
2.1.6.1 Adding repositories #Edit source
To add a repository, run
URI can either be an Internet repository, a network resource, a directory or a CD or DVD (see https://en.opensuse.org/openSUSE:Libzypp_URIs for details). The ALIAS is a shorthand and unique identifier of the repository. You can freely choose it, with the only exception that it needs to be unique. Zypper will issue a warning if you specify an alias that is already in use.
2.1.6.2 Refreshing repositories #Edit source
zypper enables you to fetch changes in packages from configured repositories. To fetch the changes, run:
Note: Default behavior of zypper
By default, some commands perform refresh automatically, so you do not need to run the command explicitly.
The refresh command enables you to view changes also in disabled repositories, by using the —plus-content option:
This option fetches changes in repositories, but keeps the disabled repositories in the same state—disabled.
2.1.6.3 Removing repositories #Edit source
To remove a repository from the list, use the command zypper removerepo together with the alias or number of the repository you want to delete. For example, to remove the repository Non-OSS Repository from Example 2.1, “Zypper—list of known repositories”, use one of the following commands:
2.1.6.4 Modifying repositories #Edit source
Enable or disable repositories with zypper modifyrepo . You can also alter the repository’s properties (such as refreshing behavior, name or priority) with this command. The following command will enable the repository named updates , turn on auto-refresh and set its priority to 20:
Modifying repositories is not limited to a single repository—you can also operate on groups:
| -a : all repositories |
| -l : local repositories |
| -t : remote repositories |
| -m TYPE : repositories of a certain type (where TYPE can be one of the following: http , https , ftp , cd , dvd , dir , file , cifs , smb , nfs , hd , iso ) |
To rename a repository alias, use the renamerepo command. The following example changes the alias from Mozilla Firefox to firefox :
2.1.7 Querying repositories and packages with Zypper #Edit source
Zypper offers various methods to query repositories or packages. To get lists of all products, patterns, packages or patches available, use the following commands:
To query all repositories for certain packages, use search . To get information regarding particular packages, use the info command.
2.1.7.1 Searching for software #Edit source
The zypper search command works on package names, or, optionally, on package summaries and descriptions. Strings wrapped in / are interpreted as regular expressions. By default, the search is not case-sensitive.
2.1.7.2 Searching for specific capability #Edit source
To search for packages which provide a special capability, use the command what-provides . For example, if you want to know which package provides the Perl module SVN::Core , use the following command:
The what-provides PACKAGE_NAME is similar to rpm -q —whatprovides PACKAGE_NAME, but RPM is only able to query the RPM database (that is the database of all installed packages). Zypper, on the other hand, will tell you about providers of the capability from any repository, not only those that are installed.
2.1.7.3 Showing package information #Edit source
To query single packages, use info with an exact package name as an argument. This displays detailed information about a package. In case the package name does not match any package name from repositories, the command outputs detailed information for non-package matches. If you request a specific type (by using the -t option) and the type does not exist, the command outputs other available matches but without detailed information.
If you specify a source package, the command displays binary packages built from the source package. If you specify a binary package, the command outputs the source packages used to build the binary package.
To also show what is required/recommended by the package, use the options —requires and —recommends :
2.1.8 Configuring Zypper #Edit source
Zypper now comes with a configuration file, allowing you to permanently change Zypper’s behavior (either system-wide or user-specific). For system-wide changes, edit /etc/zypp/zypper.conf . For user-specific changes, edit
/.zypper.conf does not yet exist, you can use /etc/zypp/zypper.conf as a template: copy it to
/.zypper.conf and adjust it to your liking. Refer to the comments in the file for help about the available options.
2.1.9 Troubleshooting #Edit source
If you have trouble accessing packages from configured repositories (for example, Zypper cannot find a certain package even though you know it exists in one of the repositories), refreshing the repositories may help:
If that does not help, try
This forces a complete refresh and rebuild of the database, including a forced download of raw metadata.
2.1.10 Zypper rollback feature on Btrfs file system #Edit source
If the Btrfs file system is used on the root partition and snapper is installed, Zypper automatically calls snapper when committing changes to the file system to create appropriate file system snapshots. These snapshots can be used to revert any changes made by Zypper. See Chapter 3, System recovery and snapshot management with Snapper for more information.
2.1.11 More information #Edit source
For more information on managing software from the command line, enter zypper help , zypper help COMMAND or refer to the zypper(8) man page. For a complete and detailed command reference, cheat sheets with the most important commands, and information on how to use Zypper in scripts and applications, refer to https://en.opensuse.org/SDB:Zypper_usage. A list of software changes for the latest openSUSE Leap version can be found at https://en.opensuse.org/openSUSE:Zypper_versions.
2.2 RPM—the package manager #Edit source
RPM (RPM Package Manager) is used for managing software packages. Its main commands are rpm and rpmbuild . The powerful RPM database can be queried by the users, system administrators and package builders for detailed information about the installed software.
rpm has five modes: installing, uninstalling (or updating) software packages, rebuilding the RPM database, querying RPM bases or individual RPM archives, integrity checking of packages and signing packages. rpmbuild can be used to build installable packages from pristine sources.
Installable RPM archives are packed in a special binary format. These archives consist of the program files to install and certain meta information used during the installation by rpm to configure the software package or stored in the RPM database for documentation purposes. RPM archives normally have the extension .rpm .
Tip: Software development packages
For several packages, the components needed for software development (libraries, headers, include files, etc.) have been put into separate packages. These development packages are only needed if you want to compile software yourself (for example, the most recent GNOME packages). They can be identified by the name extension -devel , such as the packages alsa-devel and gimp-devel .
2.2.1 Verifying package authenticity #Edit source
RPM packages have a GPG signature. To verify the signature of an RPM package, use the command rpm —checksig PACKAGE-1.2.3.rpm to determine whether the package originates from SUSE or from another trustworthy facility. This is especially recommended for update packages from the Internet.
2.2.2 Managing packages: install, update, and uninstall #Edit source
Normally, the installation of an RPM archive is quite simple: rpm -i PACKAGE.rpm. With this command the package is installed, but only if its dependencies are fulfilled and if there are no conflicts with other packages. With an error message, rpm requests those packages that need to be installed to meet dependency requirements. In the background, the RPM database ensures that no conflicts arise—a specific file can only belong to one package. By choosing different options, you can force rpm to ignore these defaults, but this is only for experts. Otherwise, you risk compromising the integrity of the system and possibly jeopardize the ability to update the system.
The options -U or —upgrade and -F or —freshen can be used to update a package (for example, rpm -F PACKAGE.rpm). This command removes the files of the old version and immediately installs the new files. The difference between the two versions is that -U installs packages that previously did not exist in the system, while -F merely updates previously installed packages. When updating, rpm updates configuration files carefully using the following strategy:
If a configuration file was not changed by the system administrator, rpm installs the new version of the appropriate file. No action by the system administrator is required.
If a configuration file was changed by the system administrator before the update, rpm saves the changed file with the extension .rpmorig or .rpmsave (backup file) and installs the version from the new package. This is done only if the originally installed file and the newer version are different. If this is the case, compare the backup file ( .rpmorig or .rpmsave ) with the newly installed file and make your changes again in the new file. Afterward, delete all .rpmorig and .rpmsave files to avoid problems with future updates.
.rpmnew files appear if the configuration file already exists and if the noreplace label was specified in the .spec file.
Following an update, .rpmsave and .rpmnew files should be removed after comparing them, so they do not obstruct future updates. The .rpmorig extension is assigned if the file has not previously been recognized by the RPM database.
Otherwise, .rpmsave is used. In other words, .rpmorig results from updating from a foreign format to RPM. .rpmsave results from updating from an older RPM to a newer RPM. .rpmnew does not disclose any information to whether the system administrator has made any changes to the configuration file. A list of these files is available in /var/adm/rpmconfigcheck . Some configuration files (like /etc/httpd/httpd.conf ) are not overwritten to allow continued operation.
The -U switch is not only an equivalent to uninstalling with the -e option and installing with the -i option. Use -U whenever possible.
To remove a package, enter rpm -e PACKAGE. This command only deletes the package if there are no unresolved dependencies. It is theoretically impossible to delete Tcl/Tk, for example, as long as another application requires it. Even in this case, RPM calls for assistance from the database. If such a deletion is, for whatever reason, impossible (even if no additional dependencies exist), it may be helpful to rebuild the RPM database using the option —rebuilddb .
2.2.3 Delta RPM packages #Edit source
Delta RPM packages contain the difference between an old and a new version of an RPM package. Applying a delta RPM onto an old RPM results in a completely new RPM. It is not necessary to have a copy of the old RPM because a delta RPM can also work with an installed RPM. The delta RPM packages are even smaller in size than patch RPMs, which is an advantage when transferring update packages over the Internet. The drawback is that update operations with delta RPMs involved consume considerably more CPU cycles than plain or patch RPMs.
The makedeltarpm and applydelta binaries are part of the delta RPM suite (package deltarpm ) and help you create and apply delta RPM packages. With the following commands, you can create a delta RPM called new.delta.rpm . The following command assumes that old.rpm and new.rpm are present:
Using applydeltarpm , you can reconstruct the new RPM from the file system if the old package is already installed:
To derive it from the old RPM without accessing the file system, use the -r option:
See /usr/share/doc/packages/deltarpm/README for technical details.
2.2.4 RPM queries #Edit source
With the -q option rpm initiates queries, making it possible to inspect an RPM archive (by adding the option -p ) and to query the RPM database of installed packages. Several switches are available to specify the type of information required. See Table 2.1, “Essential RPM query options”.
Устанавливаем RPM пакеты в Linux
Рассказываем о том, что такое RPM-пакеты, где они поддерживаются и как с ними обращаться.
Что из себя представляет RPM?
Ранее этот акроним расшифровывался как Red Hat Packet Manager. Из названия становится ясно, что это пакетный менеджер, разработанный компанией Red Hat. Только остается непонятным, что такое пакетный менеджер и что за компания такая Red Hat.
Пакетный менеджер — утилита, которая помогает распаковать в систему любое приложение и скачать все необходимые для его работы компоненты. Проще говоря — загрузчик и установщик программ в Linux.
Red Hat — ветераны в области создания операционных систем на базе Unix и Linux. На основе их Red Hat Linux были построены такие популярные дистрибутивы как Fedora, OpenSUSE и CentOS. Все они унаследовали RPM.
Также RPM — это формат файлов, который пакетный менеджер Red Hat может обрабатывать. Он довольно распространен и часто встречается на официальных сайтах популярных программ (типа Google Chrome или VS Code). Файлы в этом формате нужно скачивать, если вы используете дистрибутив на базе Red Hat Linux. Самые популярные из них: Fedora, OpenSUSE и CentOS.
Файлы RPM похожи на файлы DEB, которые используются в дистрибутивах на основе Debian (Ubuntu, Mint, Elementary OS) и в самом Debian.
Устанавливаем RPM-пакет
Для установки RPM-пакетов (то есть файлов в формате RPM) можно использовать сразу несколько инструментов. Один из них универсален для всех систем на базе Red Hat Linux, а остальные уникальны для каждого дистрибутива.
Программа RPM
Это как раз та самая универсальная утилита для работы с RPM-пакетами. С помощью нее можно устанавливать, обновлять, удалять и всячески управлять файлами в соответствующем формате.
Она работает следующим образом: вводится команда rpm, затем вводится режим, потом опции и в конце название пакета, над которым нужно провести заданные операции.
В RPM есть такие режимы:
- -q — режим получения информации. Используется, чтобы получить определенную характеристику пакета. Например, какие зависимости ему нужны для нормальной работы.
- -i — режим установки. Тут и так все понятно.
- -V — режим проверки. В этом режиме утилита проводит сравнение файлов из пакета с теми, что уже находится в системе. В рамках ее интереса оказывается MD5-сумма, выданные разрешения, тип файла и так далее.
- -U — режим обновления. Тут тоже все ясно без дополнительных комментариев.
- -e — режим удаления. В этом режиме можно избавиться от пакета.
С опциями сложнее. Их количество насчитывает несколько десятков — описывать в этой статье все не имеет смысла. Но некоторые все-таки отметить стоит, так как они непосредственно участвуют в установке RPM-пакетов.
- v — это опция, включающая Verbose, то есть подробный лог всех выполняемых программой действий.
- –force — опция, которая вынуждает RPM выполнять все операции принудительно без дополнительного ожидания.
- __ –nodeps__ — эта опция заставляет RPM игнорировать зависимости в ходе установки пакета.
- __ –replacefiles__ — настройка, которая принуждает RPM к замене всех старых файлов на новые без лишних вопросов.
Чтобы установить пакет:
- Открываем терминал любым удобным способом.

Также терминал можно запустить, одновременно нажав клавиши Ctrl + Alt + T
- Заходим в папку, где лежит наш RPM-пакет. Например: cd/Downloads.

Вы можете работать из любой другой папки, но так удобнее
- Потом запускаем RPM.
- Для простой установки подойдет такая команда: sudo rpm -i название пакета.rpm.

Вот так просто можно установить Google Chrome в формате RPM
Чтобы в ходе установки выводить в консоль все, что происходит с RPM, вводим такую команду: __sudo rpm -iv *название пакета*.rpm__.
— Вы вправе комбинировать любые варианты опций и режимов.RPM несовершенен — он имеет один существенный минус, который перекрывает большую часть его преимуществ. Он не умеет находить и устанавливать зависимости. А это значит, что большую часть программ вы просто не сможете установить без ручного поиска зависимостей и ручной загрузки из разных репозиториев.

Ошибка, которая будет часто возникать, если не пользоваться современным менеджером пакетов
Поэтому в дистрибутивах на базе Red Hat Linux появились более продвинутые пакетные менеджеры для работы с RPM-файлами.
Пакетные менеджеры популярных дистрибутивов
Рассмотрим три самых распространенных пакетных менеджера.
Этот вариант используется в дистрибутиве CentOS. Чтобы установить пакет с помощью него, введем в терминал команду sudo yum —nogpcheck localinstall название пакета.rpm.

Базовая команда для установки приложений с помощью YUM
Более продвинутая версия, которая используется в дистрибутиве Fedora. Чтобы установить пакет с помощью него, введем в терминал команду sudo dnf install название пакета.rpm

А вот так устанавливаются программы в Fedora
zypper
Это пакетный менеджер из операционной системы openSUSE. Чтобы установить пакет с помощью него, введем в терминал команду sudo zypper install название пакета.rpm.



