When I run rstudio on the command line (Linux Mint) it returns
rstudio: /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5: version `Qt_5' not found (required by rstudio)
In looking up this problem I see the suggestion to set LD_LIBRARY_PATH=... where the ... is filled in with the path to the Qt5 libs. In trying to figure out where that is, my best guess has been /usr/lib/x86_64-linux-gnu which I guessed from looking at
$ dpkg -L qt5-default
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/qt5-default
/usr/share/doc/qt5-default/copyright
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/qtchooser
/usr/share/doc/qt5-default/changelog.Debian.gz
/usr/share/doc/qt5-default/LGPL_EXCEPTION.txt
Looking at How to fix: [program name] /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8' not found (required by [program name]) and /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by emulator64-x86) made me suspect this choice but adding LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu to /.bashrc didn't fix the problem.
Interestingly, running as root makes RStudio launch.
Related
I am using Fedora 32, I have R (3.5.1 ) within conda. I also compiled R 4.0.0 from source but since I was having another problem with Rstudio I removed this version trying to solve these issues. (With 4.0.0 I couldn't install packages because I got an 'C++11 standard requested but CXX11 is not defined' error, I made the mistake of using --with-x=no during that compiling)
Now I tried to either compile a new version (4.0.1) or get R through yum, but every time I try to reinstall Rstudio I get this error:
Unable to determine real path of R script /home/andrespara/R-4.0.0/bin/R (system error 2 (Folder doesn'exist*))
I removed ~/.config/rstudio ~/.local/share/rstudio ~/.rstudio/ every time I removed/reinstalled Rstudio. I also searched for help in the rstudio community forums. I also
I compiled 4.0.1 with this line (deactivating conda before this avoided the X11 error that I had before)
./configure \
--prefix=/opt/R/${R_VERSION} \
--enable-memory-profiling \
--enable-R-shlib \
--with-blas \
--with-lapack
I added symbolic links following these instructions https://docs.rstudio.com/resources/install-r-source/
sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript
R 4.0.1 is now correctly installed, I even used it today and installed some package the only missing link is with Rstudio and its installation that doesn't recognize it.
My question is how to either jump to another version of R working with Rstudio and get rid of that message when Rstudio starts.
I should add can't even start Rstudio because it still asks for the 'broken version' even when I tried to reinstall it several times.
I managed to solve this thanks to a colleague who found a workaround.
First running RSTUDIO_WHICH_R=$(which R) and then rstudio in the console bypassed the first error.
conda deactivate
RSTUDIO_WHICH_R=$(which R)
rstudio
Then knowing the launcher was the error and thanks to this answer https://askubuntu.com/a/112259/265501 I went to /usr/share/applications
and edited the line pointing to the useless binary with the correct one in the rstudio.desktop file found there.
Edit the file ~/.profile
export RSTUDIO_WHICH_R=$(which R)
The problem is that you've created a symlink from the wrong location. Rstudio launcher is looking for R in /home/andrespara/R-4.0.0/bin/R but it can't find it there. Your symlinks should be redirecting from that location to where you installed R like this:
sudo ln -s /opt/R/${R_VERSION}/bin/R home/andrespara/R-4.0.0/bin/R
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript home/andrespara/R-4.0.0/bin/Rscript
If any of the directories in that file path don't exist, you'll have to create them as well.
I have a VM running with Centos Linux 7.7.1908. Now I ant to install devtools in R with:
> install.packages("devtools")
However, I get the following error:
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/owner/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-xml2/00new/xml2/libs/xml2.so)
When doing: strings /usr/lib64/libstdc++.so.6 | grep GLIBC it does not show GLIBCXX_3.4.20 (as expected according to the error). The anaconda version in contrast shows
$ strings /home/owner/anaconda3/lib/libstdc++.so.6 | grep GLIBCXX
[...]
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
[...]
My idea was now to force R to use the anaconda version instead of libstdc++ in lib64. I tried to add to PATH (it was already there) and LD_LIBRARY_PATH, but no success here.
Thanks for help in advance!
I tried to add to PATH (it was already there) and LD_LIBRARY_PATH, but no success here.
PATH has absolutely not effect on where the dynamic loader looks for libraries, but LD_LIBRARY_PATH does, and should have worked.
If it didn't really work, it's likely because some intermediate shell script unsets that environment variable, or prepends /usr/lib64 to it. You'll need to find that script, and fix it.
I first encountered the error referenced here:
Installing rpy2 on windows
which is that I couldn't install rpy2 because '.sh' isn't recognized by the default windows terminal as a command. To get around that, I'm using a Git Bash terminal, but then I get the error mentioned here:
Installing the R interpeter and R as a shared library uder the same tree
However, the solution in that post is for a Linux install only (I think).
As I understood that post, I should navigate to the bin/ directory in R and run ./configure (which doesn't exist in my directory). Any thoughts on how to fix this error for a Windows install?
On ubuntu 14.04 with texlive, checking an R package, for example with devtools check() would return :
LaTeX errors found:
! LaTeX Error: File `inconsolata.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
! Emergency stop.
<read *>
l.276 ^^M
! ==> Fatal error occurred, no output PDF file produced!
Installing texlive-fonts-extra should take care of it.
You can also (though probably not recommented) tell Rd not to use inconsolata. Just change:
\DeclareOption{inconsolata}{\setboolean{Rd#use#inconsolata}{true}}
to
\DeclareOption{inconsolata}{\setboolean{Rd#use#inconsolata}{false}}
in your Rd.sty file. On my installation it is at :
/usr/share/R/share/texmf/tex/latex/Rd.sty
but a
locate Rd.sty
should find it on any system.
I'm on macOS using Homebrew and this worked for me:
# LaTeX tools like pdflatex
brew cask install basictex
# Install texlive packages needed to build R package vignettes
sudo tlmgr update --self
sudo tlmgr update --all
sudo tlmgr install titling framed inconsolata
sudo tlmgr install collection-fontsrecommended
If you are using the Travis Continuous Integration
service, your problem could be related to the CTAN
mirrors having yet to update.
The issue appears in the Travis R community forum:
might be related to the recent switch to TexLive-2019 as the LaTeX package manager seems to fail finding inconsolata in the repository.
...
It looks to me like the mirror chosen was has not updated to 2019, so I think this will resolve itself naturally when the mirrors catch up. If not I can look into it.
In the meantime, I solved it by forcing a previous version of TeXLive with a downgrade to OSX 10.12 in .travis.yml:
# macOS 10.12 version
osx_image: xcode9.2
See this Travis page for the correspondence between XCode and OSX versions and the original thread in DevOps StackExchange.
In Debian, instead of installing the huge texlive-fonts-extra package, run this at your shell:
tlmgr install inconsolata
updmap-user
I have Mac OSx and the accepted solution didn't work to me.
This was the solution in my case, to install mactex: https://tug.org/mactex/mactex-download.html
tlmgr gave me a warning about a checksum. However this worked
get inconsolata.tds.zip from https://ctan.org/pkg/inconsolata
cd /usr/share/texmf/
sudo unzip inconsolata.tds.zip
sudo mktexlsr
I have had this problem every time I upgrade R. I agree the 1.7GB texlive-fonts-extra is ridiculous for a small file, although I understand that it does give you a choice of several Klingon fonts
this is for texLive on Ubuntu
Does anyone have a link to clear instructions on how to install and configure the necessary latex packages to build R packages on a mac?
I have some scripts for building and checking R packages on a mac server. They seemed to work fine, but after upgrading to R 3.1.3, many of the packages started failing with
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
Running 'texi2dvi' on 'networkVignette.tex' failed.
Messages:
sh: /usr/local/bin/texi2dvi: No such file or directory
Calls: <Anonymous> -> texi2pdf -> texi2dvi
Execution halted
I found a thread which seemed to suggest I need a more recent version texinfo (5.2) than what is installed by default. And apparently I've I've got the wrong version installed in the wrong location?
which texi2pdf
/sw/bin/texi2pdf
texi2pdf --version
texi2pdf (GNU Texinfo 5.1) 5234
(same version is reported when running system('texi2pdf --version') in R )
This thread gives a link to a texinfo 5.2 source collection:
http://r.789695.n4.nabble.com/R-CMD-build-looking-for-texi2dvi-in-the-wrong-place-R-devel-td4701706.html
But I'm not familiar with installing executable from a tar.gz file on a mac. The R mac help pages I found suggest installing MacTex, which I tried but that didn't seem to help.
** Update: ** additional discussion of related problems on R-SIG-mac mailing list:
https://groups.google.com/forum/#!topic/r-sig-mac/xjyuFdl5Ezk
Update:
Here is where I'm currently at:
I removed my /sw directory to uninstall fink and all of its packages (couldn't figure out how to upgrade it)
installed homebrew
brew install texinfo installs version 5.2 the package,
but generates the message This formula is keg-only, which means it was not symlinked into /usr/local and actually installs in in /usr/local/Cellar/texinfo/5.2/bin which means it is not on the path and R won't find it.
manually symlink each of the texi2pdf, texi2dvi , etc as vincent suggests (this is because R has the /usr/local/bin location as default in the tools::texi2dvi function?
edited the /etc/paths file on the system to add /usr/local/bin so that finds the brew installed 5.2 version before it finds it before the osx system supplied version 4.6 version. This may not be necessary because R has it hardcoded?
All of this gets rid of the "can't find texi* errors", and gives me a bunch of latex errors (which I don't see on unix and windows builds) so I'm still kind of stuck.
This seems very hackish, so there must be a cleaner way? But it sounds like stuff with tex and mac is very sketchy at the moment? https://tex.stackexchange.com/questions/208181/why-did-my-tex-related-gui-program-stop-working-in-mac-os-x-yosemite
This worked for me on Mavericks and on Yosemite:
ln -s /usr/bin/texi2dvi /usr/local/bin/texi2dvi
ln -s /usr/bin/texi2pdf /usr/local/bin/texi2pdf
On my Lion system both the command which texi2pdf at a Terminal/bash prompt and from a R.app GUI prompt tell me that I have that program in:
system("which texi2pdf")
#/opt/local/bin/texi2pdf
That is a location typical for MacPorts installation. I think the /usr/local/bin/ is what the binary R version "expects". I'm not really that UNIX savvy, but I think the you can modify the PATH environment variable so that R will be able to find your installation. (Whether it will be compatible I cannot say since so much detail is missing from your question.) My Tex installation is MacTex, which I got from https://www.tug.org/mactex/. I admit to having a cobbled-together system:
system("echo $PATH")
# /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin
That gets set at the beginning of an R session because this is the first line in my .Rprofile-(invisible)file:
Sys.setenv(PATH="/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin")
I think /sw/bin/ installations signify a fink install, which I have had very little success with. Simon Urbanek suggests not using any package installers, but then leaves the rest of us UNIX weenies very little in the way of worked examples of how to install that various external packages that underpin the many interesting and oh-so-useful R packages. So I feel your pain, but I'm not running for President.
So I suppose you could try this at your R console before again attempting one of the earlier unsuccessful installs:
Sys.setenv(PATH=paste( Sys.getenv()$PATH, # should be the character string of the $PATH
"/sw/bin/", sep=":")
)
Wish I could offer guarantees, but if it breaks the only guarantee is that you get to keep all the pieces.
I ran into a similar error message using Mavericks 10.9.5 (factory configured) and R 3.1.
It turns out that I didn't have pdfLaTex. I went to this page: http://tug.org/mactex/ and downloaded the MacTex installation package. It's big (>2GB) but after I installed it, my R package build problems went away.
Hope this might be helpful to anyone else who runs into this error message.