r-devel / rdevguide

A guide for contributing to R core development
https://contributor.r-project.org/rdevguide/
Other
60 stars 19 forks source link

Error when getting build dependencies in ubuntu #174

Open eliocamp opened 2 months ago

eliocamp commented 2 months ago

I had to install apt-rdepends. Then I got this error:

user1@MIU00235315:~/Downloads/R/bin/R$ apt-rdepends --build-depends --follow=DEPENDS r-base-dev | grep " B" | sed -e "s/  Build-Depends: //"
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Unable to read /etc/apt/preferences.d/firefox-no-snap - open (13: Permission denied)
user1@MIU00235315:~/Downloads/R/bin/R$ sudo apt-get build-dep r-base-dev
Reading package lists... Done
Picking 'r-base' as source package instead of 'r-base-dev'
E: Unable to find a source package for r-base-dev

I had to install libblas-dev liblapack-dev libreadline-dev

zkamvar commented 1 month ago

apt-rdepends seems to be really fiddly if anything fails. What version of ubuntu are you on? It looks like you might need to fix the permissions for firefox-no-snap so that other users can read.

Side note: this is probably going to be a problem for other users as well since The snap version of firefox is such a PITA (see here for the official deb package: https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions)

Here's what I have in mine (called mozilla):

Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000

Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: -1
eliocamp commented 1 month ago

I'm using Ubuntu 22.04. I don't have the snap version of Firefox, though.

zkamvar commented 1 month ago

I'm using Ubuntu 22.04. I don't have the snap version of Firefox, though.

Neither do I, but because snap is the default firefox in 22.04, there are going to be a lot of people in our situation where we have configured the apt version, but in different ways.

From what I understand the file in /etc/apt/preferences.d/firefox-no-snap de-prioritizes the default ubuntu firefox for the official one from mozilla.

llrs commented 1 month ago

I have a file in /etc/apt/preferences.d/mozilla-firefox with:


Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

But not /etc/apt/preferences.d/firefox-no-snap. The error message seems a user problem why there is a file there that apt-rdepends cannot read? (even without sudo if I recall correctly).


But I don't want to stuck to fix apt-rdepends or just list some ubuntu packages (what I proposed in a first draft).

Since R 4.1.2 (my system installation of R) the list is (from apt-rdepends ...):

bash-completion
bison
debhelper-compat (= 11)
default-jdk
g++ (>= 4:4.9.2-2)
gcc (>= 4:4.9.2-2)
gfortran (>= 4:4.9.2-2)
groff-base
libblas-dev
libbz2-dev
libcairo2-dev
libcurl4-dev
libcurl4-openssl-dev
libjpeg-dev
liblapack-dev
liblzma-dev
libncurses5-dev
libpango1.0-dev
libpcre2-dev
libpcre3-dev
libpng-dev
libreadline-dev
libtiff5-dev
libx11-dev
libxt-dev
mpack
tcl8.6-dev
texinfo (>= 4.1-2)
texlive-base
texlive-extra-utils
texlive-fonts-extra
texlive-fonts-recommended
texlive-latex-base
texlive-latex-extra
texlive-latex-recommended
texlive-plain-generic
tk8.6-dev
x11proto-core-dev
xauth
xdg-utils
xfonts-base
xvfb
zlib1g-dev

But for example the texlive is show because I use it others' might have other packages even in Ubuntu... Do you think this would be useful to have it in the book?