Linux Centos 7에서는 R에 png 및 EBImage 패키지를 설치할 수 없습니다.

Linux Centos 7에서는 R에 png 및 EBImage 패키지를 설치할 수 없습니다.

내 Linux Centos 7 시스템에 png 및 EBImage R 패키지를 설치하려고 싸우고 있습니다. 항상 다음과 같은 오류 메시지가 나타납니다.

    Error: package or namespace load failed for ‘png’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/rico/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-png/00new/png/libs/png.so':
  libpng16.so.16: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/rico/R/x86_64-redhat-linux-gnu-library/3.6/png’
Warning in install.packages :
  installation of package ‘png’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpX4o4D5/downloaded_packages’

나는 다음을 시도했습니다.

yum install libpng-devel

그리고 그것은 나에게 출력되었습니다 :

Package 2:libpng-devel-1.5.13-7.el7_2.x86_64 already installed and latest version
Nothing to do

이 문제를 해결하는 방법을 아시나요? 감사해요.

답변1

R 패키지에 필요한 것(1.6. 분기)인 것처럼 보이지만 libpng16.so.16CentOS 7의 기본값은 사용자가 설치한 패키지(1.5 분기, libpng패키지를 통해 사용 가능)입니다.

사용해도 괜찮다면광고저장소, libpng 1.6은 다음에서 사용할 수 있습니다.GetPageSpeed ​​저장소:

sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum install libpng16

또는 패키지되지 않은 파일을 루트 파일 시스템에 배치하기 때문에 권장되지 않지만, 다음 위치에 있는 미리 컴파일된 libpng16 바이너리를 사용할 수 있습니다.여기: 아카이브 추출, 사전 컴파일된 라이브러리 파일에서 까지의 심볼릭 링크 생성 libpng16.so.16, 아카이브에서 R패키지 설치까지 사용자 정의 포함 경로 제공 등...

답변2

어떤 이유로 RHEL/Centos 7에 Anaconda를 사용하면 이 문제가 발생합니다. 아마도 Anaconda가 최신 버전의 libpng.

pngR이 인식하는 anaconda를 일시적으로 제거하여 동일한 패키지 종속성을 갖는 다른 패키지를 설치할 수 있었습니다. PATH이렇게 하면 png패키지와 해당 종속 패키지가 문제 없이 설치되었습니다.

답변3

Linux centos 7 시스템에 EBImage를 설치했습니다. sudo cp /usr/local/lib/libpng16.so.16 /usr/lib문제를 해결했습니다

관련 정보