Failed to install package igraph

Hello, I can't install the igraph package. I've already tried a lot of things but it is still not working...
i am using the ubuntu 20.04.3
Here is the error message:
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Iinclude -Ics -Iplfit -ISuiteSparse_config -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -I/usr/include/libxml2 -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -I/usr/include/libxml2 -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT -DPACKAGE_VERSION="1.2.9" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c zeroin.c -o zeroin.o
gfortran -fno-optimize-sibling-calls -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong -c dgetv0.f -o dgetv0.o
/bin/bash: gfortran:fail to find the commond
make: *** [/usr/lib/R/etc/Makeconf:191:dgetv0.o] error 127
ERROR: compilation failed for package ‘igraph’

  • removing ‘/home/xian/R/x86_64-pc-linux-gnu-library/4.1/igraph’

The downloaded source packages are in
‘/tmp/RtmpeLluIX/downloaded_packages’
Warning message:
In install.packages("igraph") :
installation of package ‘igraph’ had non-zero exit status

 gfortran:fail to find the commond

Did you type this rather than copy paste it ? command/commond ? if so, thats some dedication ! :smiley:
gfortran is a system utility. So your operating system needs this (rather than R needing it per say).

follow something like this and then come back to R
apt - How do I install gfortran? - Ask Ubuntu

However, there is a new error. Would you please help me again?
this is the error:
/usr/bin/ld: can't find -llapack
/usr/bin/ld: can't find -lblas
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10:igraph.so] error 1
ERROR: compilation failed for package ‘igraph’

  • removing ‘/home/xian/R/x86_64-pc-linux-gnu-library/4.1/igraph’

thanks
:joy: I use Chinese. it is my fault. I misspelled the "command"

follow the pattern.
This means google how to install llapack, how to install lblas (for your operating system)
These are not strictly speaking R issues.

Oh, I successfully install the package with your help. Thank you , my friend

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.