[R-sig-Debian] getting started with r2u
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Sat May 17 16:52:23 CEST 2025
Ravi,
On 17 May 2025 at 13:15, ravi wrote:
| Dirk,
| Yes, I got further by following your tips. But I got trapped in a hurdle yet again. This time, the error message is:
|
| Error in loadNamespace(x) : there is no package called ‘bspm’
| Calls: suppressMessages ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
| Execution halted
[ See below too so read the whole email first. ]
At some point the script suggests to run / documentation should mention to run
sudo Rscript -e 'install.packages("bspm")'
The idea is of course to _not_ install into a path only root sees. So if
sudo Rscript -e 'print(.libPaths())'
shows a root-local path (below /root/) then you need to do the more explicit
sudo Rscript -e 'install.packages("bspm", lib="/usr/local/lib/R/site-library")'
Afterwards, 'as you', the command
Rscipt -e 'library("bspm")'
needs to succeed.
| The missing packages have now been installed:
| python3-dbus is already the newest version (1.3.2-5build3).
| python3-gi is already the newest version (3.48.2-1).
| python3-apt is already the newest version (2.7.7ubuntu4).
| make is already the newest version (4.3-4.1build2).
|
| What can I do about the namespaces error? I have checked and do not see the bspm package in any of the library locations:
|
| > .libPaths()
| [1] "/home/ravi/Ravi/Rlib" "/usr/lib/R/library" "/usr/local/lib/R/site-library"
| [4] "/usr/lib/R/site-library"
|
| I tried to force through the installation of bspm (from the website for bspm):
Note that you have distinct libraries between 'ravi' and 'root'.
| ravi using ravi-P15xEMx:~/Downloads$ sudo Rscript -e 'install.packages("bspm", repos="https://cran.r-project.org")'
| [sudo] password for ravi:
| Error in loadNamespace(x) : there is no package called ‘bspm’
Oh, that is better and more detail. You do NOT yet have 'bspm' installed but
you do (most likely) have the command to load in /etc/R/Rprofile.site.
Comment out the line 'bspm::enable()' and try again.
Dirk
| The strange thing is that, in of my previous attempts, I I did get bspm installed in one of the site-library locations. For some reason, I did not succeed now.
| Thanks, Ravi
|
|
|
|
|
|
| On Saturday, 17 May 2025 at 13:44:14 CEST, Dirk Eddelbuettel <edd using debian.org> wrote:
|
|
|
|
|
|
| Ravi,
|
| On 17 May 2025 at 10:57, ravi wrote:
| | Dirk,
| | Thanks for your help. I ran the command
| | sudo sh add_cranapt_noble.sh
| |
| | This time, it proceeded well till it came to the following hurdle:
| | Execution halted
| | E: Unable to locate package python3-{dbus,gi,apt}
| | Error in loadNamespace(x) : there is no package called ‘bspm’
| | Calls: suppressMessages ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
| |
| | I ran
| | ravi using ravi-P15xEMx:~/Downloads$ python3 --version
| | Python 3.12.3
| |
| | What do I do about
| | python3-{dbus,gi,apt}
|
| A normal shell (like bash) with expand what is in {...} so it becomes
|
| python3-dbus python3-gi python3-apt
|
| so the idea is that you install these (as root) via
|
| apt install python3-dbus python3-gi python3-apt
|
| as bspm needs them to present.
|
| | How do I get dbus (and other packages?) installed? Why doesn't the script automatically take care of this? Is this a symptom that something else is also broken?
|
| I am not on your system, so I cannot answer this. The same steps are executed
| many times each day when ever someone takes advantage of r2u, say via GitHub
| Actions.
|
| Your error above was to substitute in 'sh'. Nobody suggested that. 'sh' is
| (on Debian and derivatives) a more limited shell than 'bash', so the commands
| expecting bash did not run.
|
| Not that when a script (such as add_cranapt_noble.sh) has what is called a
| 'shebang line' as its first line that is
|
| #!/bin/bash
|
| the executing shell is determined so the common minimal step is
|
| sudo ./add_cranapt_noble.sh
|
| It's just one of those things: Unix is made up of a million little
| conventions like this one, and we all have to learn them one by one. Not your
| fault, not my fault or oversigh, just a fact of live.
|
| So please run the remaining steps of the script as root (or via sudo) and
| ensure that bash used.
|
| Cheers, Dirk
|
|
| | Thanks, Ravi
| |
| |
| |
| | On Saturday, 17 May 2025 at 10:11:26 CEST, Dirk Eddelbuettel <edd using debian.org> wrote:
| |
| |
| |
| |
| |
| |
| | Ravi,
| |
| | On 16 May 2025 at 17:07, ravi via R-SIG-Debian wrote:
| | | I decided to run the add_cranapt_noble.sh script again. I see the following now:
| | |
| | |
| | |
| | | ravi using ravi-P15xEMx:~$ sudo chmod +x /home/ravi/Downloads
| |
| | You use sudo here.
| |
| | | ravi using ravi-P15xEMx:~/Downloads$ cd /home/ravi/Downloads
| | |
| | | ravi using ravi-P15xEMx:~/Downloads$ sh add_cranapt_noble.sh
| |
| | You are supposed to use sudo here, but do not do so.
| |
| |
| | [...]
| |
| | | Please let me know what I can do.
| |
| |
| | Run as sudo. The documentation preceding the script steps clearly states
| |
| | You should run all these commands as `root` to carefully review each one.
| |
| | (and I guess I meant 'so carefully review' not 'to', will fix). The scripts
| | from inst/scripts contain the header comment
| |
| | ## Note that you need to run this as root
| |
| | Let us know how it goes.
| |
| | Good luck, Dirk
| |
| | --
| | dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
|
| |
|
| --
| dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-SIG-Debian
mailing list