[R-sig-Debian] Problem installing tkrplot package on Ubuntu 20.04

Chris Evans chr|@ho|d @end|ng |rom p@yctc@org
Sun Feb 7 09:59:39 CET 2021


I hope this is the correct list, I _think_ you stretch to Ubuntu as well as Debian (recent posts seem to say so!)

I tried to update packages on my fallback Windows machine and got a message saying "tk.h" was missing.  I reinstalled Rtools: same.  

That's for another message somewhere but, perhaps pride before a fall, I thought "Ha, I bet it works fine in Linux" ... and it doesn't,
well, not for me!  I tried this:

> install.packages("tkrplot")
Installing package into ‘/home/chris/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/tkrplot_0.0-25.tar.gz'
Content type 'application/x-gzip' length 39274 bytes (38 KB)
==================================================
downloaded 38 KB

* installing *source* package ‘tkrplot’ ...
** package ‘tkrplot’ successfully unpacked and MD5 sums checked
** using staged installation
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include/tcl8.6 -I/usr/include/tcl8.6     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c tcltkimg.c -o tcltkimg.o
tcltkimg.c:3:10: fatal error: tk.h: No such file or directory
    3 | #include <tk.h>
      |          ^~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:172: tcltkimg.o] Error 1
ERROR: compilation failed for package ‘tkrplot’
* removing ‘/home/chris/R/x86_64-pc-linux-gnu-library/4.0/tkrplot’

The downloaded source packages are in
	‘/tmp/RtmpOWOdyG/downloaded_packages’
Warning message:
In install.packages("tkrplot") :
  installation of package ‘tkrplot’ had non-zero exit status

OK. So I searched and found this (https://stat.ethz.ch/pipermail/r-sig-debian/2018-September/002956.html):

On 21 September 2018 at 20:10, Mark Leeds wrote:
| All of a sudden, I had the brilliant idea to google and the command below
| solved the problem. My apologies for noise.
| 
| sudo apt-get install tk-dev

Still too difficult / laborious. Next time remember to do

   apt-cache searck tkrplot      # or any other search term

which would have lead you to

   r-cran-tkrplot

which implies

   sudo apt install r-cran-tkrplot

is all you need. No need for the ballast of two -dev packages, no need to
locally compile.  There is a reason I packaged this maybe 15 years ago ...

Dirk

Fair point!  So ...

chris using chris-Aether2:~/Rupdate$ sudo apt-get install r-cran-tkrplot
[sudo] password for chris: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 r-cran-tkrplot : Depends: r-api-3.5
E: Unable to correct problems, you have held broken packages.

Aha, but apt-check and other things all say I don't have held or broken packages and I think r-api-3.5 is for R 3.5 whereas I'm on 4.0.3 (courtesy
of the amazing work that people here do to package R for Debian and Ubuntu: eternal thanks!)

So I've hit the outer edge of my IT competences and thought I should post here before doing anything more.  As I say, R is 4.0.3 and Ubuntu is 
updated this more 20.04.

TIA,

Chris




-- 
Small contribution in our coronavirus rigours: 
https://www.coresystemtrust.org.uk/home/free-options-to-replace-paper-core-forms-during-the-coronavirus-pandemic/

Chris Evans <chris using psyctc.org> Visiting Professor, University of Sheffield <chris.evans using sheffield.ac.uk>
I do some consultation work for the University of Roehampton <chris.evans using roehampton.ac.uk> and other places
but <chris using psyctc.org> remains my main Email address.  I have a work web site at:
   https://www.psyctc.org/psyctc/
and a site I manage for CORE and CORE system trust at:
   http://www.coresystemtrust.org.uk/
I have "semigrated" to France, see: 
   https://www.psyctc.org/pelerinage2016/semigrating-to-france/ 
   https://www.psyctc.org/pelerinage2016/register-to-get-updates-from-pelerinage2016/

If you want an Emeeting, I am trying to keep them to Thursdays and my diary is at:
   https://www.psyctc.org/pelerinage2016/ceworkdiary/
Beware: French time, generally an hour ahead of UK.



More information about the R-SIG-Debian mailing list