Closed JingqunMa closed 5 years ago
You need to install png
first, which may require a libpng-dev
package. Please show the errors you get when you try to install png
-- in short, no Seurat
without png
as per the package page too
Thank you @eddelbuettel for the reply. Here is the error when I tried to install png> install.packages("png") Installing package into â/usr/local/lib/R/site-libraryâ (as âlibâ is unspecified) trying URL 'https://mran.microsoft.com/snapshot/2019-06-16/src/contrib/png_0.1-7.tar.gz' Content type 'application/octet-stream' length 24990 bytes (24 KB)
downloaded 24 KB
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
^
compilation terminated. /usr/local/lib/R/etc/Makeconf:167: recipe for target 'read.o' failed make: *** [read.o] Error 1 ERROR: compilation failed for package âpngâ
The downloaded source packages are in â/tmp/Rtmp7kmOsC/downloaded_packagesâ Warning message: In install.packages("png") : installation of package âpngâ had non-zero exit status
libpng-dev also can't be installed. Here is the error: install.packages("libpng-dev") Installing package into â/usr/local/lib/R/site-libraryâ (as âlibâ is unspecified) Warning message: package âlibpng-devâ is not available (for R version 3.6.0)
read.c:3:17: fatal error: png.h: No such file or directory #include
You deal with that at the shell command prompt not the R prompt as it is a system library.
edd@rob:~$ dpkg -S /usr/include/png.h
libpng-dev:amd64: /usr/include/png.h
edd@rob:~$
So you need sudo apt-get install libpng-dev
to move along.
I am running the docker on a cloud machine which I don't have sudo access.
You only need sudo
inside the container.
If the container does not have the (system-level) png library and headers, then you cannot install the CRAN package png
meaning you cannot install CRAN package Seurat
. No shortcuts.
You could look into modifying the Docker container and runnning a modified one ...
But in short nothing here is a bug in Rocker so I will close this.
a workaround for not using sudo is change the PATH and remove temporary the paths pointing to anaconda for the installation, see https://stackoverflow.com/a/59556852 In practise, type in your terminal echo $PATH copy the output on a text editor and remove lines like: /opt/apps/devtools/anaconda/2019.3/python/3.7.3/bin export PATH = 'paste the new path here '
I suggest we delete this comment. Mixing Rocker with anaconda is a not generally a good idea.
ERROR: dependency 'png' is not available for package 'Seurat'