Как устанавливать pkg linux

Package Management Essentials: apt, yum, dnf, pkg

Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of packages, kept in repositories. Working with packages is known as package management. Packages provide the core components of an operating system, along with shared libraries, applications, services, and documentation.

A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.

When configuring servers or development environments, it’s often necessary to look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous resource.

This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.

Package Management Systems: A Brief Overview

Most package systems are built around collections of package files. A package file is usually an archive which contains compiled applications and other resources used by the software, along with installation scripts. Packages also contain valuable metadata, including their dependencies, a list of other packages required to install and run them.

While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:

  • For Debian / Ubuntu: .deb packages installed by apt and dpkg
  • For Rocky / Fedora / RHEL: .rpm packages installed by yum
  • For FreeBSD: .txz packages installed by pkg

In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .deb file. apt , the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. apt commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.

Recent releases of most Debian-derived distributions include a single apt command, which offers a concise and unified interface to common operations that have traditionally been handled by the more-specific apt-get and apt-cache .

Rocky Linux, Fedora, and other members of the Red Hat family use RPM files. These used to use a package manager called yum . In recent versions of Fedora and its derivatives, yum has been supplanted by dnf , a modernized fork which retains most of yum ’s interface.

Читайте также:  Создание баз данных в линуксе

FreeBSD’s binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It’s usually much more convenient to use pkg , but occasionally a pre-compiled package is unavailable, or you may need to change compile-time options.

Update Package Lists

Most systems keep a local database of the packages available from remote repositories. It’s best to update this database before installing or upgrading packages. As a partial exception to this pattern, dnf will check for updates before performing some operations, but you can ask at any time whether updates are available.

  • For Debian / Ubuntu: sudo apt update
  • For Rocky / Fedora / RHEL: dnf check-update
  • For FreeBSD Packages: sudo pkg update
  • For FreeBSD Ports: sudo portsnap fetch update

Upgrade Installed Packages

Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn’t solve every problem you’ll encounter when upgrading software, it does enable you to maintain most system components with a few commands.

On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It’s best to read /usr/ports/UPDATING before upgrading with portmaster .

  • For Debian / Ubuntu: sudo apt upgrade
  • For Rocky / Fedora / RHEL: sudo dnf upgrade
  • For FreeBSD Packages: sudo pkg upgrade

Find a Package

Most distributions offer a graphical or menu-driven front end to package collections. These can be a good way to browse by category and discover new software. Often, however, the quickest and most effective way to locate a package is to search with command-line tools.

  • For Debian / Ubuntu: apt search search_string
  • For Rocky / Fedora / RHEL: dnf search search_string
  • For FreeBSD Packages: pkg search search_string

Note: On Rocky, Fedora, or RHEL, you can search package titles and descriptions together by using dnf search all . On FreeBSD, you can search descriptions by using pkg search -D

View Info About a Specific Package

When deciding what to install, it’s often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package’s dependencies.

  • For Debian / Ubuntu: apt show package
  • For Rocky / Fedora / RHEL: dnf info package
  • For FreeBSD Packages: pkg info package
  • For FreeBSD Ports: cd /usr/ports/ category / port && cat pkg-descr

Install a Package from Repositories

Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install at once by listing them all.

  • For Debian / Ubuntu: sudo apt install package
  • For Rocky / Fedora / RHEL: sudo dnf install package
  • For FreeBSD Packages: sudo pkg install package

Install a Package from the Local Filesystem

Sometimes, even though software isn’t officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or via curl on the command line. Once a package is on the target system, it can often be installed with a single command.

Читайте также:  Linux resize disk partition

On Debian-derived systems, dpkg handles individual package files. If a package has unmet dependencies, gdebi can often be used to retrieve them from official repositories.

On On Rocky Linux, Fedora, or RHEL, dnf is used to install individual files, and will also handle needed dependencies.

  • For Debian / Ubuntu: sudo dpkg -i package.deb
  • For Rocky / Fedora / RHEL: sudo dnf install package.rpm
  • For FreeBSD Packages: sudo pkg add package.txz

Remove One or More Installed Packages

Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.

  • For Debian / Ubuntu: sudo apt remove package
  • For Rocky / Fedora / RHEL: sudo dnf erase package
  • For FreeBSD Packages: sudo pkg delete package

Get Help

In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as man pages) are available for most commands from the shell. To read a page, use man :

In man , you can navigate with the arrow keys. Press / to search for text within the page, and q to quit.

  • For Debian / Ubuntu: man apt
  • For Rocky / Fedora / RHEL: man dnf
  • For FreeBSD Packages: man pkg
  • For FreeBSD Ports: man ports

Conclusion and Further Reading

This guide provides an overview of operations that can be cross-referenced between systems, but only scratches the surface of a complex topic. For greater detail on a given system, you can consult the following resources:

  • This guide covers Ubuntu and Debian package management in detail.
  • There’s a Fedora wiki page about dnf , and an official manual for dnf itself.
  • This guide covers FreeBSD package management using pkg .
  • The FreeBSD Handbook contains a section on using the Ports Collection.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Источник

How to install .pkg file in ubuntu?

According to wiki, .pkg is the Mac OSX-specific package type. As little (again, according to wiki) is known about the format, it is not surprising dpkg cannot support it.

If there are other versions of the software you have, other than the .pkg file, you should probably pick the .deb file. That would be handled by dpkg.

We cant install .pkg files in Ubuntu .Please find out windows version of application and we can install using Wine

regards,
Christain
clouddesktoponline

Similar topics

Hey PHP Fans! If you’re a Linux fan and haven’t installed Screem to see if that doesn’t become your favorite PHP editor, I highly recommend it. It’s a snap to install on Ubuntu Linux, which has.

Over the last few days, I reinstalled Win2kSP2 to a spare harddrive I had just swapped into my Fujitsu LifeBook P1120 (long story ). Subsequently, I DL’ed the newest Python alpha (2.4a2), and.

I love pexpect because it means I may never have to use expect again (I don’t do any heavy expect lifting — I just need simple tty control)! As a python advocate I find it embarassing how.

Читайте также:  Mediatek 7921 linux driver debian

I am a perl newbie who is trying to write a script to automate a task. I have a large collection of compressed archives (mostly .tar.gz, tar.bz2, tar.Z, .tgz etc). This are stored in a number.

Hello I have recently installed DB2 express on UBUNTU and am not able to get it to start. I decided to uninstall and reinstall DB2. When I enter the command sudo ./db2_deinstall it says «No DB2.

Hi, This is the log file for my SP1 on 2005 install. Can anyone please look at this and tell me if this looks normal? I’m concerned about the following in the log: «Failed to read registry.

hi, I have got a batch file where i have written the following modules from CPAN: ppm install DBI ppm install DBD::mysql ppm install Config::Properties ppm install Net::SMTP ppm.

Dear all, I am trying to install File server Resource Manager to apply user level directory quota. Tried to use this link for help , it is as below: I checked the GIF file But on my.

Hello everyone: I met a problem when install blt2.4z. I have installed tcl8.4 and tk8.4 in my linux-x86 system. I install blt follow the step in INSTALL file. 1.tar zxvf BLT2.4z.tar.gz .

The next Access Europe meeting will be on Wednesday 7 June 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central.

hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

Hi all) Faced with a problem, element.click() event doesn’t work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event(‘click’,

I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent.

I have a table that can contain up to 12 entries for an individual in the number field each number can be different number I want only to add up the top 7 numbers for each individual. What’s the.

Hello, I have a tabbed form. On each tab there is a subform. On Subform1 I have a series of combo boxes whose names are Combo1, Combo2, Combo3, etc. and button that if the user clicks will write.

What is the best, comprehensive Reference for programming Windows Applications in VB.NET. I have experience in programming in general, but not VB.NET. Thanks in advance.

B.Distributed Deployment 1). Deploy the distributed software sh antdb_install.sh ### the difference between distributed and centralized software deployment is as follows.

The next Access Europe meeting will be on Wednesday 5 July 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central.

By using Bytes.com and it’s services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.

Источник

Оцените статью
Adblock
detector