Score:1

Installing torch: undefined symbol for liblantern.so

bv flag

I try to install the R-Version of pytorch CPU, to avoid using reticulate as a workaround. I simply used install.packages("torch") which successfully finished.

When using library(torch) after that, it states that there must be two additional system dependencies installed, e.g. libtorch and liblantern

So running install_torch() manually downloads both dependencies as zip files. However, then the following error occurs:

trying URL 'https://storage.googleapis.com/torch-lantern-builds/refs/heads/cran/v0.9.1/latest/Linux-cpu.zip'
Content type 'application/zip' length 4844513 bytes (4.6 MB)
==================================================
downloaded 4.6 MB

/R/x86_64-pc-linux-gnu-library/4.2/torch/lib/liblantern.so: undefined symbol:
  _ZNK5torch3jit6MethodclESt6vectorIN3c106IValueESaIS4_EERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_St4hashISD_ESt8equal_toISD_ESaISt4pairIKSD_S4_EEE

Furthermore, I installed R using sudo apt-get --assume-yes install -y r-base.

I'm working on an Ubuntu 22.04 LTS. Any ideas how to solve this?

David avatar
cn flag
Do you know that the file you are running is intended for Ubuntu 22.04 and that the files it is trying to download work on this version.
hr flag
If you installed R from somewhere other than the Ubuntu repository, please [edit] your question to clarify how
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.