21 Would possibly 2024
apt-get Set up Particular Model | Linux Package deal Information
The power to put in explicit variations of applications has come in useful date managing servers at TECHTALKNEW.. Drawing from our experience and processes, now we have crafted nowadays’s article to deal with the query of the right way to set up a selected model of a package deal the usage of ‘apt-get’. Our hope is to handover a useful useful resource for our devoted webhosting consumers and fellow builders who need to strengthen their package deal control and server depoloyment potency.
This information will progress you throughout the steps to put in a selected model of a package deal the usage of apt-get, from ordinary significance to complicated ways. We’ll discover apt-get’s core capability, delve into its complicated options, or even talk about familiar problems and their answers.
So, let’s dive in and get started mastering apt-get!
TL;DR: How Do I Set up a Particular Model of a Package deal The use of apt-get?
To put in a selected model of a package deal the usage of apt-get, you significance refer to command:
sudo apt-get set up =
. This command lets you specify the package deal and the model you wish to have to put in.
Right here’s a easy instance:
sudo apt-get set up curl=7.58.0-2ubuntu3.8
# Output:
# Studying package deal lists... Finished
# Development dependency tree
# Studying order knowledge... Finished
# curl is already the most recent model (7.58.0-2ubuntu3.8).
# 0 upgraded, 0 newly put in, 0 to take away and zero no longer upgraded.
On this instance, we’re the usage of the apt-get set up
command to put in a selected model of the curl package deal. The model is specified next the equals signal. The output confirms that the required model of curl is already put in.
It is a ordinary option to significance
apt-get set up
to put in a selected model of a package deal, however there’s a lot more to be told about managing applications in Linux with apt-get. Proceed studying for extra crystal clear knowledge and complicated utilization situations.
Desk of Contents
- The Fundamentals of apt-get set up
- Dependency Control Tactics
- Extra Forms: Yum and Zypper
- Habitual Problems with apt-get set up
- Package deal Control Basics
- Working out Model Control
- Relevance of Particular Versioning
- Additional Data: Package deal Control
- Recap: apt-get and Particular Variations
The Fundamentals of apt-get set up
The apt-get set up
command is a elementary software for any Linux person. It’s part of the Complicated Packaging Instrument (APT) device, which is a collection of core libraries and a command-line significance designed to take care of applications in Linux. The apt-get set up
command lets you set up any to be had model of a instrument package deal.
To specify a model, you append an equals signal and the model quantity to the package deal identify. Right here’s the overall syntax:
sudo apt-get set up <package deal>=<model>
Let’s see this in motion with a real-world instance:
sudo apt-get set up apache2=2.4.29-1ubuntu4.14
# Output:
# Studying package deal lists... Finished
# Development dependency tree
# Studying order knowledge... Finished
# Please see alternative applications will probably be put in:
# apache2-data
# Prompt applications:
# www-browser apache2-doc apache2-suexec-pristine | apache2-suexec-custom
# Please see NEW applications will probably be put in:
# apache2 apache2-data
# 0 upgraded, 2 newly put in, 0 to take away and zero no longer upgraded.
# Wish to get 1,358 kB of archives.
# Later this operation, 5,537 kB of alternative disk range will probably be old.
# Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/major amd64 apache2-data all 2.4.29-1ubuntu4.14 [159 kB]
# Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/major amd64 apache2 amd64 2.4.29-1ubuntu4.14 [1,199 kB]
# Fetched 1,358 kB in 1s (1,013 kB/s)
# Settling on prior to now unselected package deal apache2-data.
# (Studying database ... 145480 information and directories lately put in.)
# Getting ready to unpack .../apache2-data_2.4.29-1ubuntu4.14_all.deb ...
# Unpacking apache2-data (2.4.29-1ubuntu4.14) ...
# Settling on prior to now unselected package deal apache2.
# Getting ready to unpack .../apache2_2.4.29-1ubuntu4.14_amd64.deb ...
# Unpacking apache2 (2.4.29-1ubuntu4.14) ...
# Putting in place apache2-data (2.4.29-1ubuntu4.14) ...
# Putting in place apache2 (2.4.29-1ubuntu4.14) ...
# Enabling module mpm_event.
# Enabling module authz_core.
# Enabling module authz_host.
# Enabling module authn_core.
# Enabling module auth_basic.
# Enabling module access_compat.
# Enabling module authn_file.
# Enabling module authz_user.
# Enabling module alias.
# Enabling module dir.
# Enabling module autoindex.
# Enabling module env.
# Enabling module mime.
# Enabling module negotiation.
# Enabling module setenvif.
# Enabling module clear out.
# Enabling module deflate.
# Enabling module condition.
# Enabling module reqtimeout.
# Enabling conf charset.
# Enabling conf localized-error-pages.
# Enabling conf other-vhosts-access-log.
# Enabling conf safety.
# Enabling conf serve-cgi-bin.
# Enabling web site 000-default.
# Created symlink /and so forth/systemd/device/multi-user.goal.desires/apache2.provider → /lib/systemd/device/apache2.provider.
# Created symlink /and so forth/systemd/device/multi-user.goal.desires/apache-htcacheclean.provider → /lib/systemd/device/apache-htcacheclean.provider.
# Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
# Processing triggers for systemd (237-3ubuntu10.44) ...
# Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
# Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
On this instance, we’re the usage of apt-get set up
to put in a selected model of the Apache2 package deal. The output confirms that the required model of Apache2 is put in, and it additionally lists the alternative applications that have been put in as dependencies.
Past apt-get set up
is a formidable command, it’s very important to watch out when specifying variations. Putting in an used model of a package deal would possibly split dependencies with different applications, eminent to instrument instability. Subsequently, it’s all the time beneficial to grasp the results and produce positive the particular model you’re putting in is appropriate along with your device.
Dependency Control Tactics
When putting in explicit variations of applications the usage of apt-get set up
, you could come across dependency problems. Those happen when the model you’re seeking to set up calls for a unique model of every other package deal than the only lately put in to your device. In such instances, apt-get
will aim to get to the bottom of those dependencies, however it might probably on occasion supremacy to conflicts.
For example this, let’s aim to put in a model of a package deal that has dependencies:
sudo apt-get set up libssl1.0.0=1.0.2n-1ubuntu5.6
# Output:
# Studying package deal lists... Finished
# Development dependency tree
# Studying order knowledge... Finished
# Some applications may no longer be put in. This will likely heartless that you've got
# asked an unattainable condition or in case you are the usage of the unbalanced
# distribution that some required applications have no longer but been created
# or been moved out of Incoming.
# Please see knowledge would possibly aid to get to the bottom of the condition:
#
# Please see applications have unmet dependencies:
# libssl1.0.0 : Relies: libc6 (>= 2.14) however 2.27-3ubuntu1 is to be put in
# E: Not able to proper issues, you may have held damaged applications.
On this instance, the libssl1.0.0
package deal calls for a unique model of libc6
than the only put in at the device. In consequence, apt-get
is not able to put in the required model of libssl1.0.0
.
To get to the bottom of such problems, you could want to set up the desired model of the dependent applications manually or significance a package deal supervisor that may take care of complicated dependencies mechanically.
Every other complicated significance of apt-get set up
is to put in more than one explicit variations of applications without delay. This can also be achieved via specifying each and every package deal and its model, separated via a range:
sudo apt-get set up curl=7.58.0-2ubuntu3.8 libssl1.0.0=1.0.2n-1ubuntu5.6
# Output:
# Studying package deal lists... Finished
# Development dependency tree
# Studying order knowledge... Finished
# curl is already the most recent model (7.58.0-2ubuntu3.8).
# Some applications may no longer be put in. This will likely heartless that you've got
# asked an unattainable condition or in case you are the usage of the unbalanced
# distribution that some required applications have no longer but been created
# or been moved out of Incoming.
# Please see knowledge would possibly aid to get to the bottom of the condition:
#
# Please see applications have unmet dependencies:
# libssl1.0.0 : Relies: libc6 (>= 2.14) however 2.27-3ubuntu1 is to be put in
# E: Not able to proper issues, you may have held damaged applications.
On this instance, we’re seeking to set up explicit variations of each curl
and libssl1.0.0
. Alternatively, because of the dependency factor with libssl1.0.0
, the command fails.
When the usage of apt-get set up
to take care of explicit variations, it’s notable to grasp the dependencies between applications and the right way to top them. It’s additionally the most important to understand that date you’ll be able to set up more than one explicit variations without delay, the command will fail if any of the applications have unmet dependencies.
Extra Forms: Yum and Zypper
Past apt-get
is a formidable software for managing applications in Linux, it’s no longer the one one. Alternative package deal managers like yum
and zypper
additionally do business in the facility to put in explicit variations of applications. Those choices may well be extra appropriate relying to your device’s distribution or your individual personal tastes.
Putting in Particular Variations with Yum
Yum
(Yellowdog Updater, Changed) is the default package deal supervisor for Crimson Hat-based distributions. Like apt-get
, yum
lets you set up explicit variations of applications. Right here’s the overall syntax:
sudo yum set up <package deal>-<model>
Right here’s an instance of putting in a selected model of the httpd
package deal the usage of yum
:
sudo yum set up httpd-2.4.6-90.el7.centos
# Output:
# Loaded plugins: fastestmirror
# Loading reflect speeds from cached hostfile
# * bottom: reflect.umd.edu
# * extras: reflect.umd.edu
# * updates: reflect.umd.edu
# Resolving Dependencies
# --> Working transaction take a look at
# ---> Package deal httpd.x86_64 0:2.4.6-90.el7.centos will probably be put in
# --> Completed Dependency Solution
#
# Dependencies Resolved
#
# ================================================================================
# Package deal Arch Model Repository Measurement
# ================================================================================
# Putting in:
# httpd x86_64 2.4.6-90.el7.centos bottom 2.7 M
#
# Transaction Abstract
# ================================================================================
# Set up 1 Package deal
#
# General obtain measurement: 2.7 M
# Put in measurement: 9.4 M
# Is that this adequate [y/d/N]: y
# Downloading applications:
# httpd-2.4.6-90.el7.centos.x86_64.rpm | 2.7 MB 00:00:01
# Working transaction take a look at
# Working transaction check
# Transaction check succeeded
# Working transaction
# Putting in : httpd-2.4.6-90.el7.centos.x86_64 1/1
# Verifying : httpd-2.4.6-90.el7.centos.x86_64 1/1
#
# Put in:
# httpd.x86_64 0:2.4.6-90.el7.centos
#
# Whole!
On this instance, we’re the usage of yum set up
to put in a selected model of the httpd
package deal. The output confirms that the required model of httpd
is put in.
Putting in Particular Variations with Zypper
Zypper
is the default package deal supervisor for openSUSE distributions. Like apt-get
and yum
, zypper
too can set up explicit variations of applications. Right here’s the overall syntax:
sudo zypper set up <package deal>-<model>
Right here’s an instance of putting in a selected model of the apache2
package deal the usage of zypper
:
sudo zypper set up apache2-2.4.23-8.1.x86_64
# Output:
# Loading repository information...
# Studying put in applications...
# Resolving package deal dependencies...
#
# Please see NEW package deal goes to be put in:
# apache2
#
# 1 untouched package deal to put in.
# Total obtain measurement: 1.1 MiB. Already cached: 0 B. Later the operation, alternative 3.4 MiB will probably be old.
# Proceed? [y/n/...? shows all options] (y): y
# Retrieving package deal apache2-2.4.23-8.1.x86_64
# (1/1), 1.1 MiB ( 3.4 MiB unpacked)
# Retrieving: apache2-2.4.23-8.1.x86_64.rpm ...................................................[done]
# Checking for record conflicts: ........................................................................[done]
# (1/1) Putting in: apache2-2.4.23-8.1.x86_64 ....................................................[done]
On this instance, we’re the usage of zypper set up
to put in a selected model of the apache2
package deal. The output confirms that the required model of apache2
is put in.
Those examples illustrate that date apt-get
is a formidable software for putting in explicit variations of applications in Linux, there are different package deal managers like yum
and zypper
that do business in alike capability. Relying to your device’s distribution and your individual personal tastes, those choices may well be extra appropriate.
Habitual Problems with apt-get set up
Past the usage of apt-get set up
to put in explicit variations of applications, you could come across some familiar problems. One of the customery problems is the ‘E: Version ‘…’ for ‘…’ used to be no longer discovered’ error. This mistake happens when the required model of the package deal isn’t to be had to your configured repositories.
Resolving ‘E: Version ‘…’ for ‘…’ used to be no longer discovered’ Error
Let’s see an instance of this mistake and the right way to get to the bottom of it:
sudo apt-get set up curl=7.58.0-2ubuntu3.9
# Output:
# Studying package deal lists... Finished
# Development dependency tree
# Studying order knowledge... Finished
# E: Model '7.58.0-2ubuntu3.9' for 'curl' used to be no longer discovered
On this instance, we’re seeking to set up model 7.58.0-2ubuntu3.9 of the curl package deal, which doesn’t exist within the repositories configured on our device. In consequence, apt-get
throws an error.
To get to the bottom of this factor, you’ll be able to significance the apt-cache coverage
command to checklist the to be had variations of the package deal to your repositories:
apt-cache coverage curl
# Output:
# curl:
# Put in: 7.58.0-2ubuntu3.8
# Candidate: 7.58.0-2ubuntu3.8
# Model desk:
# *** 7.58.0-2ubuntu3.8 500
# 500 http://archive.ubuntu.com/ubuntu bionic-updates/major amd64 Programs
# 100 /var/lib/dpkg/condition
# 7.58.0-2ubuntu3 500
# 500 http://archive.ubuntu.com/ubuntu bionic/major amd64 Programs
On this output, you’ll be able to see the to be had variations of the curl package deal. You’ll nearest make a selection a model from this checklist to put in.
By means of figuring out the familiar problems you could come across date the usage of apt-get set up
for explicit variations and realizing the right way to get to the bottom of them, you’ll be able to safeguard a clean and environment friendly package deal control procedure.
Package deal Control Basics
apt-get
is a formidable command-line software old in Debian and Ubuntu-based Linux distributions for dealing with applications. It stands for ‘Advanced Package Tool’, and because the identify suggests, it lets in customers to engage with the instrument applications in their device. It makes use of a repository of to be had applications and their variations to put in, improve, or take away instrument on a Linux device.
sudo apt-get replace
# Output:
# Accident:1 http://archive.ubuntu.com/ubuntu bionic InRelease
# Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
# Get:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
# Get:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
# Fetched 252 kB in 1s (185 kB/s)
# Studying package deal lists... Finished
On this instance, we’re the usage of apt-get replace
to replace the package deal lists for upgrades and untouched package deal installations. This command is in most cases old sooner than putting in or upgrading applications to safeguard you’re getting the untouched variations to be had.
Working out Model Control
Linux distributions top instrument variations the usage of repositories. A repository is a locker location from which instrument applications are retrieved and put in on a device. Every Linux distribution has its personal i’m ready of repositories that include the entire instrument applications and their variations that the distribution helps.
Whilst you significance apt-get set up
to put in a selected model of a package deal, apt-get
exams the repositories for the required model and installs it. If the model isn’t present in any of the repositories, apt-get
will go back an error.
You’ll take a look at the variations of a package deal to be had to your repositories the usage of the apt-cache coverage
command:
apt-cache coverage curl
# Output:
# curl:
# Put in: 7.58.0-2ubuntu3.8
# Candidate: 7.58.0-2ubuntu3.8
# Model desk:
# *** 7.58.0-2ubuntu3.8 500
# 500 http://archive.ubuntu.com/ubuntu bionic-updates/major amd64 Programs
# 100 /var/lib/dpkg/condition
# 7.58.0-2ubuntu3 500
# 500 http://archive.ubuntu.com/ubuntu bionic/major amd64 Programs
On this instance, we’re the usage of apt-cache coverage
to test the to be had variations of the curl package deal in our repositories. The output presentations the put in model, the candidate model (the model that may be put in for those who ran apt-get set up curl
with out specifying a model), and a desk of all to be had variations.
Working out the basics of the apt-get
command and the way variations are controlled in Linux distributions is the most important to successfully the usage of apt-get set up
for explicit variations.
Relevance of Particular Versioning
The power to put in explicit variations of instrument applications is not only a neat trick; it’s an important talent for device directors and instrument builders. In device management, you could want to guard legacy methods that depend on used variations of instrument applications. In instrument construction, you may well be growing towards a selected model of a library or framework.
As such, figuring out the right way to significance apt-get set up
to put in explicit variations is an very important a part of managing a Linux device. It will give you the regulate to make a decision which variations of instrument applications your device runs, permitting you to top dependencies, mitigate safety dangers, and guard compatibility.
Additional Data: Package deal Control
The sector in Linux doesn’t prevent at putting in explicit variations. There are lots of alike ideas which can be importance exploring, reminiscent of instrument repositories and package deal dependencies.
Instrument repositories are locker places from which instrument applications are retrieved and put in on a device. Every Linux distribution has its personal i’m ready of repositories that include the entire instrument applications and their variations that the distribution helps. Working out how repositories paintings can aid you top your device extra successfully.
Package deal dependencies are every other the most important side of package deal control. Whilst you set up a instrument package deal, it will rely on different applications to serve as accurately. Those dependencies can turn into complicated, particularly when coping with explicit variations. Working out how dependencies paintings can aid you get to the bottom of problems and safeguard the steadiness of your device.
Additional Assets for Mastering apt-get set up
For many who wish to delve deeper into the intricacies of apt-get set up
and package deal control in Linux, listed here are some sources to discover:
- Debian Manual: Package deal Control: This manual supplies a complete information to package deal control in Debian, the distribution on which Ubuntu is founded.
-
Ubuntu Documentation: Package deal Control: This information from the legit Ubuntu documentation supplies an summary of package deal control in Ubuntu.
-
Linux Travel: Package deal Control: This lesson supplies a beginner-friendly advent to package deal control in Linux, together with the significance of
apt-get set up
.
Recap: apt-get
and Particular Variations
On this complete information, we’ve delved into the crystal clear utilization of apt-get set up
to put in explicit variations of applications in Linux. We’ve explored the command’s core capability, complicated options, and answers to familiar problems, offering a radical figuring out of this tough software for package deal control in Linux.
We started with the fundamentals, finding out the right way to significance apt-get set up
to put in explicit variations of applications. We nearest dove into extra complicated utilization, discussing the right way to take care of dependencies and set up more than one variations without delay. We additionally checked out familiar problems that it’s possible you’ll come across when the usage of apt-get set up
for explicit variations, reminiscent of ‘E: Version ‘…’ for ‘…’ used to be no longer discovered’ error, and supplied answers to those issues.
Alongside the way in which, we explored extra approaches to putting in explicit variations, introducing different package deal managers like yum
and zypper
. Right here’s a handy guide a rough comparability of those forms:
Mode | Execs | Cons |
---|---|---|
apt-get | Tough, broadly old in Debian-based distros | Would possibly require troubleshooting for some applications |
yum | Default in Crimson Hat-based distros, alike capability | Other syntax, no longer old in Debian-based distros |
zypper | Default in openSUSE, alike capability | Other syntax, no longer old in Debian-based distros |
Whether or not you’re a device administrator keeping up legacy methods, a developer operating towards explicit variations of libraries, or a Linux fanatic having a look to grasp extra about your device, we are hoping this information has supplied you with a deeper figuring out of the right way to significance apt-get set up
to put in explicit variations of applications in Linux.
Mastering apt-get set up
for explicit variations equips you with better regulate over your device, permitting you to top dependencies, mitigate safety dangers, and guard compatibility. Glad package deal managing!