R: Having trouble installing rpanel

2020-08-09 09:29发布

问题:

I am trying to install the packages rpanel and tkrplot on RStudio. After downloading and installing there I got this message:

downloaded 686 Kb
* installing *source* package ‘rpanel’ ...
** package ‘rpanel’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
  [tcl] can't find package BWidget.

Error : unable to load R code in package ‘rpanel’
ERROR: lazy loading failed for package ‘rpanel’
* removing ‘..../R/i686-pc-linux-gnu-library/3.0/rpanel’
Warning in install.packages :
  installation of package ‘rpanel’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmp1MdC0f/downloaded_packages’

I already installed BWidget on my own, but it didn't help. Anyone any ideas about this problem and maybe can help me? The system is Ubuntu 12.04. Under windows 7 there is no problem and everything is working fine.

回答1:

There are easier ways to install BWidgets. On my mac with Macports I did:

sudo port install BWidget

On Ubuntu you can probably install it with apt-get:

sudo apt-get install bwidget


回答2:

"Stumbled across this while looking for an answer to the same question. Like an unfortunate number of library authors, the BWidgets people have assumed that the only people who need to use their libraries are planning to code with them. For those of us who've never used TCL, the installation instructions mean nothing.

From the a document called tuto-install-tkabber on the tkabber.jabber.ru website (irritating spam catcher won't let me post a URL), the answer is:

Install the BWidgets directory into the "lib" directory returned by: whereis tcl

It should look something like: /usr/lib/tcl8.4"

from http://www.linuxquestions.org/questions/linux-software-2/where-to-install-bwidget-tcl-98583/ did the trick for me

Also I got BWidget from: http://sourceforge.net/projects/tcllib/files/BWidget/1.7.0/BWidget-1.7.0.zip/download



回答3:

I had similar issues trying to get biotools working in Rstudio (on Ubuntu 16.04), where rpanel and tkrplot are required. Even after installing Bwidget per Calimo's answer, I got the error installation of package ‘tkrplot’ had non-zero exit status because tk.h: No such file or directory. If you look in the directory, this error is definitely correct. You need to get tk.h in there. I found out how to do so elsewhere on stackexchange:

Install tcl-dev package using apt or synaptic; tcl contains the runtime, while tcl-devel contains header and development files. Do the same with tk-dev

from: https://stackoverflow.com/a/9649478/10405322

Thus,

sudo apt-get install tcl-dev
sudo apt-get install tk-dev


回答4:

@Calimo's answer worked for me on Linux Mint 18.3 RStudio R 3.6.0. I would have commented in @Calimo's thread except for the stupid 50 reputation limit.

sudo apt-get install bwidget

Also works for Ubuntu 18 R 3.4.4 but if you get an X11 issue with rgl then this helped from @Ouistiti.



回答5:

download BWidget from http://sourceforge.net/project/showfiles.php?group_id=12883 once you get the archive BWidget-1.7.0.tar.gz move it to /usr/local/lib and install it with following code in terminal:

sudo mv /some_download_path/BWidget-1.7.0.tar.gz /usr/local/lib
cd /usr/loca/lib
sudo tar zxf BWidget-1.7.0.tar.gz

ok, done.



标签: r package