在Docker上的Rstudio上安装包png,但失败

我在Docker上安装rstudio服务器。 当我想安装包png时,我得到了一个错误的消息

`* installing *source* package 'png' ... ** package 'png' successfully unpacked and MD5 sums checked ** libs gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG -I/usr/local/include `libpng-config --cflags` -fpic -g -O2 -fstack-protector-strong -Wformat - Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c read.c -o read.o /bin/bash: libpng-config: command not found read.c:3:17: fatal error: png.h: No such file or directory #include <png.h> ^ compilation terminated. /usr/local/lib/R/etc/Makeconf:132: recipe for target 'read.o' failed make: *** [read.o] Error 1 ERROR: compilation failed for package 'png' * removing '/usr/local/lib/R/site-library/png' Warning in install.packages : installation of package 'png' had non-zero exit status` 

我想也许我应该安装一个名为libpng-devel的库,但是如何将它安装在docker下?请告诉我吗? 如果是Ubuntu或者Centos,我知道apt-get或者yum,但是在docker下,我很困惑。