How to upgrade one single package and all its dependencies with apt?
Clash Royale CLAN TAG#URR8PPP
I am using curl
in a building script on Travis CI. There is apt-get update && apt-get upgrade
in my before_install
option. The command consumes some time before building. However, I only need to upgrade curl
itself and all its dependencies. If I use apt-get install curl
only curl
and libcurl3
will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g
and other dependencies of curl
or libcurl3
. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies
?
apt
add a comment |
I am using curl
in a building script on Travis CI. There is apt-get update && apt-get upgrade
in my before_install
option. The command consumes some time before building. However, I only need to upgrade curl
itself and all its dependencies. If I use apt-get install curl
only curl
and libcurl3
will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g
and other dependencies of curl
or libcurl3
. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies
?
apt
2
That should already be happening if you doapt-get install curl
. At least if it is dependency information is correct in the package.
– Zoredache
Jan 8 at 19:12
2
Possible duplicate of how to upgrade a single package in debian
– GAD3R
Jan 8 at 22:25
@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I runapt-get install curl libcurl3
only the two packages will be upgraded, other dependencies oflibcurl3
likelibssl1.0.0
andlibc6
will not be upgraded.
– Steven Yang
Jan 9 at 9:17
Immediate dependencies, or also transitive dependencies? The former is much easier (e.g.aptitude install '~rcurl'
) than the latter.
– Toby Speight
Jan 9 at 14:35
@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found onpackages.ubuntu.com
to upgrade.
– Steven Yang
Jan 9 at 16:06
add a comment |
I am using curl
in a building script on Travis CI. There is apt-get update && apt-get upgrade
in my before_install
option. The command consumes some time before building. However, I only need to upgrade curl
itself and all its dependencies. If I use apt-get install curl
only curl
and libcurl3
will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g
and other dependencies of curl
or libcurl3
. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies
?
apt
I am using curl
in a building script on Travis CI. There is apt-get update && apt-get upgrade
in my before_install
option. The command consumes some time before building. However, I only need to upgrade curl
itself and all its dependencies. If I use apt-get install curl
only curl
and libcurl3
will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g
and other dependencies of curl
or libcurl3
. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies
?
apt
apt
edited Jan 9 at 13:07
Steven Yang
asked Jan 8 at 19:00
Steven YangSteven Yang
422
422
2
That should already be happening if you doapt-get install curl
. At least if it is dependency information is correct in the package.
– Zoredache
Jan 8 at 19:12
2
Possible duplicate of how to upgrade a single package in debian
– GAD3R
Jan 8 at 22:25
@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I runapt-get install curl libcurl3
only the two packages will be upgraded, other dependencies oflibcurl3
likelibssl1.0.0
andlibc6
will not be upgraded.
– Steven Yang
Jan 9 at 9:17
Immediate dependencies, or also transitive dependencies? The former is much easier (e.g.aptitude install '~rcurl'
) than the latter.
– Toby Speight
Jan 9 at 14:35
@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found onpackages.ubuntu.com
to upgrade.
– Steven Yang
Jan 9 at 16:06
add a comment |
2
That should already be happening if you doapt-get install curl
. At least if it is dependency information is correct in the package.
– Zoredache
Jan 8 at 19:12
2
Possible duplicate of how to upgrade a single package in debian
– GAD3R
Jan 8 at 22:25
@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I runapt-get install curl libcurl3
only the two packages will be upgraded, other dependencies oflibcurl3
likelibssl1.0.0
andlibc6
will not be upgraded.
– Steven Yang
Jan 9 at 9:17
Immediate dependencies, or also transitive dependencies? The former is much easier (e.g.aptitude install '~rcurl'
) than the latter.
– Toby Speight
Jan 9 at 14:35
@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found onpackages.ubuntu.com
to upgrade.
– Steven Yang
Jan 9 at 16:06
2
2
That should already be happening if you do
apt-get install curl
. At least if it is dependency information is correct in the package.– Zoredache
Jan 8 at 19:12
That should already be happening if you do
apt-get install curl
. At least if it is dependency information is correct in the package.– Zoredache
Jan 8 at 19:12
2
2
Possible duplicate of how to upgrade a single package in debian
– GAD3R
Jan 8 at 22:25
Possible duplicate of how to upgrade a single package in debian
– GAD3R
Jan 8 at 22:25
@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run
apt-get install curl libcurl3
only the two packages will be upgraded, other dependencies of libcurl3
like libssl1.0.0
and libc6
will not be upgraded.– Steven Yang
Jan 9 at 9:17
@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run
apt-get install curl libcurl3
only the two packages will be upgraded, other dependencies of libcurl3
like libssl1.0.0
and libc6
will not be upgraded.– Steven Yang
Jan 9 at 9:17
Immediate dependencies, or also transitive dependencies? The former is much easier (e.g.
aptitude install '~rcurl'
) than the latter.– Toby Speight
Jan 9 at 14:35
Immediate dependencies, or also transitive dependencies? The former is much easier (e.g.
aptitude install '~rcurl'
) than the latter.– Toby Speight
Jan 9 at 14:35
@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on
packages.ubuntu.com
to upgrade.– Steven Yang
Jan 9 at 16:06
@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on
packages.ubuntu.com
to upgrade.– Steven Yang
Jan 9 at 16:06
add a comment |
1 Answer
1
active
oldest
votes
The best i can think is something like...
pack=curl
apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)
But the packages, to be upgraded, maybe have dependencies too...
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493306%2fhow-to-upgrade-one-single-package-and-all-its-dependencies-with-apt%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The best i can think is something like...
pack=curl
apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)
But the packages, to be upgraded, maybe have dependencies too...
add a comment |
The best i can think is something like...
pack=curl
apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)
But the packages, to be upgraded, maybe have dependencies too...
add a comment |
The best i can think is something like...
pack=curl
apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)
But the packages, to be upgraded, maybe have dependencies too...
The best i can think is something like...
pack=curl
apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)
But the packages, to be upgraded, maybe have dependencies too...
answered Jan 8 at 19:21
Luciano Andress MartiniLuciano Andress Martini
3,728931
3,728931
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493306%2fhow-to-upgrade-one-single-package-and-all-its-dependencies-with-apt%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
That should already be happening if you do
apt-get install curl
. At least if it is dependency information is correct in the package.– Zoredache
Jan 8 at 19:12
2
Possible duplicate of how to upgrade a single package in debian
– GAD3R
Jan 8 at 22:25
@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run
apt-get install curl libcurl3
only the two packages will be upgraded, other dependencies oflibcurl3
likelibssl1.0.0
andlibc6
will not be upgraded.– Steven Yang
Jan 9 at 9:17
Immediate dependencies, or also transitive dependencies? The former is much easier (e.g.
aptitude install '~rcurl'
) than the latter.– Toby Speight
Jan 9 at 14:35
@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on
packages.ubuntu.com
to upgrade.– Steven Yang
Jan 9 at 16:06