Automatically install unmet build dependencies as detected by dpkg-checkbuilddeps
Is there a command that installs all the unmet build dependencies that dpkg-checkbuilddeps
would list?
I tried to sed
the output and give it to apt-get install
, but it seems very hacky and for some reason didn't work in some environments.
sudo apt-get install --yes $(dpkg-checkbuilddeps | sed 's/([^)]*)//g' | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies://g')
Is there a better way?
debian apt dpkg dependencies
add a comment |
Is there a command that installs all the unmet build dependencies that dpkg-checkbuilddeps
would list?
I tried to sed
the output and give it to apt-get install
, but it seems very hacky and for some reason didn't work in some environments.
sudo apt-get install --yes $(dpkg-checkbuilddeps | sed 's/([^)]*)//g' | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies://g')
Is there a better way?
debian apt dpkg dependencies
add a comment |
Is there a command that installs all the unmet build dependencies that dpkg-checkbuilddeps
would list?
I tried to sed
the output and give it to apt-get install
, but it seems very hacky and for some reason didn't work in some environments.
sudo apt-get install --yes $(dpkg-checkbuilddeps | sed 's/([^)]*)//g' | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies://g')
Is there a better way?
debian apt dpkg dependencies
Is there a command that installs all the unmet build dependencies that dpkg-checkbuilddeps
would list?
I tried to sed
the output and give it to apt-get install
, but it seems very hacky and for some reason didn't work in some environments.
sudo apt-get install --yes $(dpkg-checkbuilddeps | sed 's/([^)]*)//g' | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies://g')
Is there a better way?
debian apt dpkg dependencies
debian apt dpkg dependencies
edited Jan 26 at 13:25
Stephen Kitt
170k24383460
170k24383460
asked Jan 11 '18 at 21:44
ForivinForivin
205215
205215
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I use mk-build-deps
from the devscripts
package for this (you’ll also need equivs
).
mk-build-deps debian/control
will build a package depending on all the build-dependencies in the given control file; that package can then be installed using apt
, which will also install all the missing dependencies.
The advantage of this approach is that uninstalling the dependency package, once you’ve finished with it, will also identify any build-dependencies which could also be uninstalled.
add a comment |
Try the following:
dpkg-checkbuilddeps 2>&1 | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies: //g' | sed 's/[(][^)]*[)] //g'
First of all, dpkg-checkbuilddeps
prints out the error to stderr
not stdout
. So it needs to be redirected to stdout
to use pipeline.
Here is how to Redirect stderr
and stdout
in Bash
You used the regex ([^)]*)
on:
sed 's/([^)]*)//g'
But it should be:
sed 's/[(][^)]*[)] //g'
Reference: Using sed to delete a string between parentheses
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%2f416457%2fautomatically-install-unmet-build-dependencies-as-detected-by-dpkg-checkbuilddep%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I use mk-build-deps
from the devscripts
package for this (you’ll also need equivs
).
mk-build-deps debian/control
will build a package depending on all the build-dependencies in the given control file; that package can then be installed using apt
, which will also install all the missing dependencies.
The advantage of this approach is that uninstalling the dependency package, once you’ve finished with it, will also identify any build-dependencies which could also be uninstalled.
add a comment |
I use mk-build-deps
from the devscripts
package for this (you’ll also need equivs
).
mk-build-deps debian/control
will build a package depending on all the build-dependencies in the given control file; that package can then be installed using apt
, which will also install all the missing dependencies.
The advantage of this approach is that uninstalling the dependency package, once you’ve finished with it, will also identify any build-dependencies which could also be uninstalled.
add a comment |
I use mk-build-deps
from the devscripts
package for this (you’ll also need equivs
).
mk-build-deps debian/control
will build a package depending on all the build-dependencies in the given control file; that package can then be installed using apt
, which will also install all the missing dependencies.
The advantage of this approach is that uninstalling the dependency package, once you’ve finished with it, will also identify any build-dependencies which could also be uninstalled.
I use mk-build-deps
from the devscripts
package for this (you’ll also need equivs
).
mk-build-deps debian/control
will build a package depending on all the build-dependencies in the given control file; that package can then be installed using apt
, which will also install all the missing dependencies.
The advantage of this approach is that uninstalling the dependency package, once you’ve finished with it, will also identify any build-dependencies which could also be uninstalled.
edited Jan 26 at 13:25
answered Jan 12 '18 at 6:28
Stephen KittStephen Kitt
170k24383460
170k24383460
add a comment |
add a comment |
Try the following:
dpkg-checkbuilddeps 2>&1 | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies: //g' | sed 's/[(][^)]*[)] //g'
First of all, dpkg-checkbuilddeps
prints out the error to stderr
not stdout
. So it needs to be redirected to stdout
to use pipeline.
Here is how to Redirect stderr
and stdout
in Bash
You used the regex ([^)]*)
on:
sed 's/([^)]*)//g'
But it should be:
sed 's/[(][^)]*[)] //g'
Reference: Using sed to delete a string between parentheses
add a comment |
Try the following:
dpkg-checkbuilddeps 2>&1 | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies: //g' | sed 's/[(][^)]*[)] //g'
First of all, dpkg-checkbuilddeps
prints out the error to stderr
not stdout
. So it needs to be redirected to stdout
to use pipeline.
Here is how to Redirect stderr
and stdout
in Bash
You used the regex ([^)]*)
on:
sed 's/([^)]*)//g'
But it should be:
sed 's/[(][^)]*[)] //g'
Reference: Using sed to delete a string between parentheses
add a comment |
Try the following:
dpkg-checkbuilddeps 2>&1 | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies: //g' | sed 's/[(][^)]*[)] //g'
First of all, dpkg-checkbuilddeps
prints out the error to stderr
not stdout
. So it needs to be redirected to stdout
to use pipeline.
Here is how to Redirect stderr
and stdout
in Bash
You used the regex ([^)]*)
on:
sed 's/([^)]*)//g'
But it should be:
sed 's/[(][^)]*[)] //g'
Reference: Using sed to delete a string between parentheses
Try the following:
dpkg-checkbuilddeps 2>&1 | sed 's/dpkg-checkbuilddeps:serror:sUnmet build dependencies: //g' | sed 's/[(][^)]*[)] //g'
First of all, dpkg-checkbuilddeps
prints out the error to stderr
not stdout
. So it needs to be redirected to stdout
to use pipeline.
Here is how to Redirect stderr
and stdout
in Bash
You used the regex ([^)]*)
on:
sed 's/([^)]*)//g'
But it should be:
sed 's/[(][^)]*[)] //g'
Reference: Using sed to delete a string between parentheses
edited Jan 31 '18 at 10:09
galoget
35729
35729
answered Jan 31 '18 at 7:21
argenhongargenhong
1
1
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%2f416457%2fautomatically-install-unmet-build-dependencies-as-detected-by-dpkg-checkbuilddep%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