[R-sig-Debian] getting started with r2u
ravi
rv15| @end|ng |rom y@hoo@@e
Sat May 17 19:17:09 CEST 2025
Dirk,
Thanks. I seem to progress. Slowly, not sure when I will reach the final destination.
1. I edited and added the lfollowing line in the script add_cranapt_noble.sh :
sudo Rscript -e 'install.packages("bspm", lib="/usr/local/lib/R/site-library")'
2. Added the following line as well:
Rscipt -e 'library("bspm")'
3. I commented out the following lines as you suggested:
##echo "suppressMessages(bspm::enable())" >> ${RHOME}/etc/Rprofile.site
##echo "options(bspm.version.check=FALSE)" >> ${RHOME}/etc/Rprofile.site
Before I did this, I found a series of the above messages in the Rprofile.site file. I deleted these from Rprofile.site.
4. Some other strange happenings. First, the following:
ravi using ravi-P15xEMx:~/Downloads$ sudo ./add_cranapt_noble.sh
sudo: ./add_cranapt_noble.sh: command not found
Why this sudden change? This had worked before. Now, I was forced to turn to
sudo sh add_cranapt_noble.sh
This worked.
5. Once again, I got the following message:
E: Unable to locate package python3-{dbus,gi,apt}
Even after running:
sudo apt install python3-dbus python3-gi python3-apt
This appeared to run without any problems. Why the problem in locating these packages later?
6. I ran
ravi using ravi-P15xEMx:~/Downloads$ whereis python3
python3: /usr/bin/python3 /usr/lib/python3 /etc/python3 /usr/share/python3 /usr/share/man/man1/python3.1.gz
I could not figure out a method for locating the dbus and other packages. Why are they not showing their presence?
7. Anyway, the bspm package has now been installed in /usr/local/lib/R/site-library.
No namespace error is returned. I can install packages. But they are still from source. It does not appear that I am getting access to the binaries. How can I test for this?
Thanks, Ravi
Added this line as well.
| 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