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

RStudio can't find libR.so. #14001

Open
abalter opened this issue Nov 28, 2023 · 5 comments
Open

RStudio can't find libR.so. #14001

abalter opened this issue Nov 28, 2023 · 5 comments
Labels

Comments

@abalter
Copy link

abalter commented Nov 28, 2023

System details

RStudio Edition : Desktop
RStudio Version : RStudio 2023.09.1+494 "Desert Sunflower " (cd7011dc, 2023-10-16) for Ubuntu Jammy
OS Version      :  Ubuntu 22.04
R Version       :  4.3.2

Steps to reproduce the problem

  1. wget https://download1.rstudio.org/electron/jammy/amd64/rstudio-2023.09.1-494-amd64.deb
  2. sudo dpkg -i rstudio-2023.09.1-494-amd64.deb
  3. rstudio

Problem Report

The RStudio pane is frozen and the problem report button won't click. Here is an image:

image

Additional System Information

(base) balter@expiyes:~$ ls -l /bin/R
lrwxrwxrwx 1 root root 29 Nov 28 10:18 /bin/R -> /home/balter/micromamba/bin/R
(base) balter@expiyes:~$ ls -l /usr/bin/R
lrwxrwxrwx 1 root root 29 Nov 28 10:18 /usr/bin/R -> /home/balter/micromamba/bin/R
(base) balter@expiyes:~$ ls -l /lib/R
lrwxrwxrwx 1 root root 29 Nov 28 10:18 /lib/R -> /home/balter/micromamba/lib/R
(base) balter@expiyes:~$ ls -l /lib/R/lib/libR.so
-rwxrwxr-x 2 balter balter 3881432 Nov  2 01:59 /lib/R/lib/libR.so
(base) balter@expiyes:~$ ls -l /usr/lib/R
lrwxrwxrwx 1 root root 29 Nov 28 10:18 /usr/lib/R -> /home/balter/micromamba/lib/R
(base) balter@expiyes:~$ ls -l /usr/lib/R/lib/libR.so
-rwxrwxr-x 2 balter balter 3881432 Nov  2 01:59 /usr/lib/R/lib/libR.so
(base) balter@expiyes:~$ Rscript -e ".libPaths()"
[1] "/home/balter/micromamba/lib/R/library"
(base) balter@expiyes:~$ Rscirpt -e ".Library"
Command 'Rscirpt' not found, did you mean:
  command 'Rscript' from deb r-base-core (4.1.2-1ubuntu2)
Try: sudo apt install <deb name>
(base) balter@expiyes:~$ Rscript -e ".Library"
[1] "/home/balter/micromamba/lib/R/library"
(base) balter@expiyes:~$ Rscript -e "Sys.getenv()"
_                       /home/balter/micromamba/bin/Rscript
CLOUDSDK_PYTHON_SITEPACKAGES
                        1
CONDA_DEFAULT_ENV       base
CONDA_PREFIX            /home/balter/micromamba
CONDA_PROMPT_MODIFIER   (base)
CONDA_SHLVL             1
DISPLAY                 :0
EDITOR                  vi
GCP_ACCESS_TOKEN        ya29.a0AfB_byCvXqLnBUCrd1KTRQbSBiCNuligV3X9i-JGenBgwaiMxwPZxa7a90_NX6A_F36dUmiy_wwfi4NVL9dGiSb_RbT0Ms0ulsC5a1MrjcEnuiPGh_6aDZmXaSBUtUlA47Zla1ruO3RZgiyPv35AT39suuLapfX7yP4sNm4aCgYKAb4SARISFQHGX2MikDtc2zHTCcRtv6gvskWezw0174
GIT_EDITOR              vim
GSETTINGS_SCHEMA_DIR    /home/balter/micromamba/share/glib-2.0/schemas
GSETTINGS_SCHEMA_DIR_CONDA_BACKUP

HOME                    /home/balter
HOSTTYPE                x86_64
JAVA_HOME               /home/balter/micromamba/lib/jvm
JAVA_HOME_CONDA_BACKUP
                        /home/balter/micromamba/lib/jvm
JAVA_LD_LIBRARY_PATH    /home/balter/micromamba/lib/jvm/lib/server
JAVA_LD_LIBRARY_PATH_BACKUP
                        /home/balter/micromamba/lib/jvm/lib/server
LANG                    C.UTF-8
LESSCLOSE               /usr/bin/lesspipe %s %s
LESSOPEN                | /usr/bin/lesspipe %s
LN_S                    ln -s
LOGNAME                 balter
LS_COLORS               rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
MAKE                    make
MAMBA_EXE               /home/balter/.local/bin/micromamba
MAMBA_ROOT_PREFIX       /home/balter/micromamba
NAME                    expiyes
NVM_DIR                 /home/balter/.nvm
OLDPWD                  /home/balter/.cache
PAGER                   less
PATH                    /home/balter/micromamba/bin:/home/balter/.local/bin:/home/balter/micromamba/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program
                        Files/dotnet/:/mnt/c/Program
                        Files/usbipd-win/:/mnt/c/Program Files
                        (x86)/NVIDIA
                        Corporation/PhysX/Common:/mnt/c/Program
                        Files/Docker/Docker/resources/bin:/mnt/c/Users/ariel/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/ariel/AppData/Local/Programs/Microsoft
                        VS Code/bin:/snap/bin
PULSE_SERVER            unix:/mnt/wslg/PulseServer
PWD                     /home/balter
R_ARCH
R_BROWSER
R_BZIPCMD               /home/conda/feedstock_root/build_artifacts/r-base-split_1698915151601/_build_env/bin/bzip2
R_DOC_DIR               /home/balter/micromamba/lib/R/doc
R_GZIPCMD               gzip
R_HOME                  /home/balter/micromamba/lib/R
R_INCLUDE_DIR           /home/balter/micromamba/lib/R/include
R_LIBS_SITE             /home/balter/micromamba/lib/R/site-library
R_LIBS_USER             /home/balter/micromamba/lib/R/libraries
R_PAPERSIZE             a4
R_PDFVIEWER
R_PLATFORM              x86_64-conda-linux-gnu
R_PRINTCMD
R_RD4PDF                times,inconsolata,hyper
R_SESSION_TMPDIR        /tmp/Rtmp40CURK
R_SHARE_DIR             /home/balter/micromamba/lib/R/share
R_STRIP_SHARED_LIB      x86_64-conda-linux-gnu-strip --strip-unneeded
R_STRIP_STATIC_LIB      x86_64-conda-linux-gnu-strip --strip-debug
R_SYSTEM_ABI            linux,gcc,gxx,gfortran,gfortran
R_TEXI2DVICMD           /home/conda/feedstock_root/build_artifacts/r-base-split_1698915151601/_build_env/bin/texi2dvi
R_UNZIPCMD
R_ZIPCMD
RSTUDIO_WHICH_R         /home/balter/micromamba/bin/R
SCREENDIR               /home/balter/.screen
SED                     /home/balter/micromamba/bin/sed
SHELL                   /bin/bash
SHLVL                   1
TAR                     tar
TERM                    xterm-256color
USER                    balter
WAYLAND_DISPLAY         wayland-0
WSL_DISTRO_NAME         Ubuntu
WSL_INTEROP             /run/WSL/847_interop
WSL2_GUI_APPS_ENABLED   1
WSLENV                  WT_SESSION:WT_PROFILE_ID:
WT_PROFILE_ID           {2c4de342-38b7-51cf-b940-2309a097f518}
WT_SESSION              b18c42f2-d556-4099-8714-fb6349a619c1
XDG_DATA_DIRS           /usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_RUNTIME_DIR         /mnt/wslg/runtime-dir
XML_CATALOG_FILES       file:///home/balter/micromamba/etc/xml/catalog
                        file:///etc/xml/catalog
(base) balter@expiyes:~$ rstudio
[17914:1128/102940.098905:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[17914:1128/102940.948986:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[17914:1128/102940.949079:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[17914:1128/102940.960038:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[17914:1128/102940.960165:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[17914:1128/102940.960205:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[17914:1128/102940.960243:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[17944:1128/102940.978690:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[17944:1128/102940.982127:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[17914:1128/102941.504703:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[17914:1128/102941.553539:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[17914:1128/102941.584206:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:
[18003:1128/102941.605712:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[18003:1128/102941.608970:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[18010:1128/102941.639300:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[18010:1128/102941.643307:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[18019:1128/102941.656926:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[18019:1128/102941.661254:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[17914:1128/102941.882904:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "UNIX")
  • [ x] I have read the guide for submitting good bug reports.
  • [ x] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • [x ] If I am reporting an RStudio crash, I have included a diagnostics report.
  • [ x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
@abalter abalter added bug new New incoming issues, ready for initial review. labels Nov 28, 2023
@abalter
Copy link
Author

abalter commented Nov 28, 2023

EDIT

I eventually got the problem report button to work:

R Session Startup Failure Report

RStudio Version

RStudio 2023.09.1+494 "Desert Sunflower " (cd7011d, 2023-10-16) for Ubuntu Jammy

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.09.1+494 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36

Error message

[No error available]

Process Output

The R session exited with code 127.

Error output:

/usr/lib/rstudio/resources/app/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory

Standard output:

[No output emitted]

Logs

Log File

[No logs available]

@ronblum ronblum removed the new New incoming issues, ready for initial review. label Dec 17, 2023
@simon7073
Copy link

simon7073 commented Jan 2, 2024

I found the answer with a clean Ubuntu(22.04.3) system.

  • Install Rstudio using sudo and set the default shell to bash
    Add to a user group

    usermod -aG USERNAME -s /bin/bash rstudio-server
  • Install the conda/mamba.

  • Create R virtual environment (not recommended to install R in base environment)
    Activate the R virtual environment and run

    echo "PKG_CONFIG_PATH=${CONDA_PREFIX}/lib/pkgconfig" >> ${CONDA_PREFIX}/lib/R/etc/Renviron.site
    env >> ${CONDA_PREFIX}/lib/R/etc/Renviron.site
  • Modify the Rstudio configuration
    Activate the R virtual environment and run

    echo "www-port=8787" >> /etc/rstudio/rserver.conf
    echo "rsession-which-r=${CONDA_PREFIX}/bin/R" >> /etc/rstudio/rserver.conf
    echo "rsession-ld-library-path=${CONDA_PREFIX}/lib" >> /etc/rstudio/rserver.conf

Later, when you install some R packages, it may happen that a library cannot be found, and it may remind you to install it using apt or yum, but you don't need to do that, you just need to install it using conda in R's virtual environment.

@abalter
Copy link
Author

abalter commented Jan 2, 2024

@nsleep -- I'm trying to run rstudio desktop. The above will get rstudio server to work most of the time.

@simon7073
Copy link

Sorry, I was careless.

I tried executing export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib/R/lib under R virtual environment and then running rstudio. R is running in Rstudio. Rstudio is ready to run.
1704182870500

BUT there are still some errors in the console.
1704182956719
I don't know how this came about. T_T (Maybe it doesn't matter?)

@kevinushey
Copy link
Contributor

If RStudio is running and functional, then I believe those errors can be ignored. The GL implementation errors relate to RStudio having trouble using hardware acceleration, presumedly RStudio is running with software rendering but potentially at some degraded performance. I'm less sure about the other messages.

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

No branches or pull requests

4 participants