Installation error on Ubuntu 18.04
Hi! Was trying to install Quanteda and it complain that RSpectra is needed. When trying to install, these errors popped up:
`../inst/include/RMatOp/RealShift_matrix.h:31:60: required from here
/usr/lib/R/site-library/RcppEigen/include/Eigen/src/Core/CoreEvaluators.h:960:8: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits
- removing ‘/home/chubuntu/R/x86_64-pc-linux-gnu-library/3.4/RSpectra’ Warning in install.packages : installation of package ‘RSpectra’ had non-zero exit status
The downloaded source packages are in ‘/tmp/RtmpI1Gl2k/downloaded_packages’`
May I know how to resolve this?
As the error message indicates, you need to install the gfortran library.
I already had gfortran installed:
gfortran is already the newest version (4:7.3.0-3ubuntu2.1)
the error message:
/usr/bin/x86_64-linux-gnu-ld: cannot find -lgfortran
but /usr/bin/x86_64-linux-gnu-ld is not a directory. So what is the package looking for?
Including the development files? You need something like libgfortran-7-dev in Ubuntu.
yep...got that too.
libgfortran-7-dev is already the newest version (7.3.0-27ubuntu1~18.04). libgfortran-7-dev set to manually installed. The following packages were automatically install
Then I really have no clue. Seems like a system setting problem. The only workaround I can think of is to manually add your libgfortran path to the Makevars file:
PKG_LIBS = -L/path/to/libgfortran $(BLAS_LIBS) $(FLIBS)