Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
51
rated 0 times [  51] [ 0]  / answers: 1 / hits: 92116  / 3 Years ago, tue, june 8, 2021, 10:47:06

On the apt-get man's page, one can find this:




install pkg(s)

This option is followed by one or more packages desired
for installation. Each package is a package name, not a fully
qualified filename (for instance, in a Fedora Core system, glibc would
be the argument provided, not glibc-2.4.8.i686.rpm).

All packages required by the package(s) specified for installation
will also be retrieved and installed
.

[...]



build-dep source_pkg

Causes apt-get to install/remove packages in an
attempt to satisfy the build dependencies for a source package.




It sounds like both of those are trying to satisfy dependencies, but I had different results while installing matplotlib with each of those: apt-get intall didn't work with my subsequent pip install matplotlib in my virtualenv, while apt-get build-dep did*.



* Yeah, I needed to install matplotlib in a venv, but pip couldn't resolve some of the dependencies, so I lazily used apt in order to solve it


More From » apt

 Answers
1

The short version.



apt-get install


installs a new package, automatically resolving and downloading dependent packages. If package is installed then try to upgrade to latest version.



apt-get build-dep


Causes apt-get to install/remove packages in an attempt to satisfy the build dependencies for a source package.



The command sudo apt-get build-dep packagename means to install all dependencies for 'packagename' so that I can build it". So build-dep is an apt-get command just like install, remove, update, etc.



The build-dep command searches the local repositories in the system and install the build dependencies for package. If the package does not exists in the local repository it will return an error code.



For installing matplotlib see To Install matplotlib on Ubuntu



Source:ManPage & Ravi Saive


[#30193] Thursday, June 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dresuitable

Total Points: 69
Total Questions: 116
Total Answers: 122

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
dresuitable questions
Sat, May 15, 21, 04:38, 3 Years ago
Fri, Apr 14, 23, 09:53, 1 Year ago
Tue, May 16, 23, 18:13, 1 Year ago
Sun, Apr 24, 22, 12:59, 2 Years ago
;