Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error on Ubuntu 18.04 #10

Open
chuk-yong opened this issue Oct 18, 2018 · 5 comments
Open

Installation error on Ubuntu 18.04 #10

chuk-yong opened this issue Oct 18, 2018 · 5 comments

Comments

@chuk-yong
Copy link

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::type {aka __vector(2) double}’ [-Wignored-attributes]
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RSpectra.so eigs_gen.o eigs_sym.o matops.o register_routines.o svds.o -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/x86_64-linux-gnu-ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'RSpectra.so' failed
make: *** [RSpectra.so] Error 1
ERROR: compilation failed for package ‘RSpectra’

  • 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?

@yixuan
Copy link
Owner

yixuan commented Oct 19, 2018

As the error message indicates, you need to install the gfortran library.

@chuk-yong
Copy link
Author

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?

@yixuan
Copy link
Owner

yixuan commented Oct 19, 2018

Including the development files? You need something like libgfortran-7-dev in Ubuntu.

@chuk-yong
Copy link
Author

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

@yixuan
Copy link
Owner

yixuan commented Oct 25, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants