Closed StarTrooper08 closed 1 year ago
There's a crucial difference between the install
and the build-dep
commands. It's described in man apt-get
.
An apt-get install r-base-dev
will install r-base-dev
itself and the packages it "depends upon", i.e. the packages r-base-dev
needs in order to run. (If you follow the link, you can see the hard dependencies marked with red circles, but APT can be set up to install additional packages as well.)
An apt-get build-dep r-base-dev
will look up the corresponding source package, r-base
, and install all packages required to compile it from source. It will not install r-base-dev
or any other binary package resulting from compiling r-base
.
Granted, in this case the two sets of packages (dependencies of r-base-dev
and build-dependencies of src:r-base
) have a large intersection, but they do differ. When you're compiling R, you need the latter, not the former. The former is needed when you compile R packages, i.e. when you run install.packages(type = "source")
, not R itself. For example, apt build-dep r-base
will install libx11-dev
, libxt-dev
, and headers for Pango and Cairo, which are required to build the x11()
device and the few bits of interactive GUI that R has on Unix-like systems. apt install r-base-dev
will not get you these packages, and it will also install R (which you were going to compile from source instead).
See also: Debian administrator's handbook, chapters 6.2 and 15.
I tried apt-get build-dep r-base-dev but didn't gave me any output like whether it builded package.
But when I tried with install instead of build-dep it worked.
And also gaved me msg that only r-base version can be build using build-dep.
It's hard to give advice without precise error messages, but you may be missing the deb-src
directives in your sources.list
files, see Debian Handbook 6.1 and 15.1.1. This could be worth mentioning in the guide.
@StarTrooper08 I hope that the guidance given by @aitap helped you. I think the best next step would be to close this PR since apt-get build-dep r-base-dev
performs a different task than apt-get install
. While I appreciate that you took the time to create a PR, I believe that this change isn't needed at this time.
cmd fix