1

(this blocks the installation of the R package 'png')

When I do:

sudo apt-get install libpng*

I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb
E: Couldn't find any package by regex 'libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb'

How to install all of libpng?

muru
  • 207,970
user2413
  • 15,047

1 Answers1

3

libpng* does not mean what you think it means for two reasons:

  1. The shell expanded it to be libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb because there was a file of that name in your current directory.
  2. Even if the shell hadn't expanded it, apt-get would take it as a regular expression. So, it will install any packaging containing libpn in the name.

You might want to do:

sudo apt-get install libpng12-dev
muru
  • 207,970
  • I think 2. is what I have been advised to do. Can it be done? – user2413 Mar 09 '16 at 21:55
  • 1
    @user2413 I think libpng12-dev is sufficient (as also indicated by the other user). If you really need to, you can do sudo apt-get install 'libpng*' - note the quotes. – muru Mar 09 '16 at 21:57
  • actually, the quotes were necessary: it added 600k of software which solved the problem! – user2413 Mar 09 '16 at 22:16