程序'tclsh'目前没有安装?

时间:2017-04-10 07:31:57

标签: tcl ubuntu-16.04 tk

我正在尝试在我的ubuntu16.04计算机上安装tcl / tk8.4版本。完成apt-get install命令后。如果我输入tclsh命令。我收到此错误消息说:程序'tclsh'当前未安装。您可以通过键入来安装它。 sudo atp-get install tcl。

 The steps followed are as follows: 
 1. I have removed the latest tcl/tk8.6, using autoremove commands 
 2.dccom@dccom-vm:~$ sudo apt-get install tk8.4 tcl8.4
 [sudo] password for dccom:
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 The following additional packages will be installed:
 libtk8.4
 Suggested packages:
 tcl-tclreadline
 The following NEW packages will be installed:
   libtk8.4 tcl8.4 tk8.4
 0 upgraded, 3 newly installed, 0 to remove and 350 not upgraded.
 Need to get 567 kB/581 kB of archives.
 After this operation, 1.858 kB of additional disk space will be used.
 Do you want to continue? [Y/n] Y
 Get:1 http://id.archive.ubuntu.com/ubuntu xenial/universe i386 libtk8.4 
 i386 8.4.20-8 [556 kB]
 Get:2 http://id.archive.ubuntu.com/ubuntu xenial/universe i386 tk8.4 i386 
 8.4.20-8 [11,5 kB]
 Fetched 567 kB in 1s (331 kB/s)
 Selecting previously unselected package libtk8.4:i386.
 (Reading database ... 276714 files and directories currently installed.)
 Preparing to unpack .../libtk8.4_8.4.20-8_i386.deb ...
 Unpacking libtk8.4:i386 (8.4.20-8) ...
 Selecting previously unselected package tcl8.4.
 Preparing to unpack .../tcl8.4_8.4.20-8_i386.deb ...
 Unpacking tcl8.4 (8.4.20-8) ...
 Selecting previously unselected package tk8.4.
 Preparing to unpack .../tk8.4_8.4.20-8_i386.deb ...
 Unpacking tk8.4 (8.4.20-8) ...
 Processing triggers for libc-bin (2.23-0ubuntu4) ...
 Processing triggers for man-db (2.7.5-1) ...
 Setting up libtk8.4:i386 (8.4.20-8) ...
 Setting up tcl8.4 (8.4.20-8) ...
 Setting up tk8.4 (8.4.20-8) ...
 Processing triggers for libc-bin (2.23-0ubuntu4) ...

 Error info:

 dccom@dccom-vm:~$ tclsh
 The program 'tclsh' is currently not installed. You can install it by 
 typing:
 sudo apt install tcl

我需要在这里设置任何环境变量吗?请建议。

1 个答案:

答案 0 :(得分:0)

默认情况下,# Creates a multi-plot function for use in the graphs below multiplot <- function(..., plotlist=NULL, file, cols=1, layout=NULL) { library(grid) # Make a list from the ... arguments and plotlist plots <- c(list(...), plotlist) numPlots = length(plots) # If layout is NULL, then use 'cols' to determine layout if (is.null(layout)) { # Make the panel # ncol: Number of columns of plots # nrow: Number of rows needed, calculated from # of cols layout <- matrix(seq(1, cols * ceiling(numPlots/cols)), ncol = cols, nrow = ceiling(numPlots/cols)) } if (numPlots==1) { print(plots[[1]]) } else { # Set up the page grid.newpage() pushViewport(viewport(layout = grid.layout(nrow(layout), ncol(layout)))) # Make each plot, in the correct location for (i in 1:numPlots) { # Get the i,j matrix positions of the regions that contain this subplot matchidx <- as.data.frame(which(layout == i, arr.ind = TRUE)) print(plots[[i]], vp = viewport(layout.pos.row = matchidx$row, layout.pos.col = matchidx$col)) } } } # Call multiplot function after storing each of the below plots as variables ln_clr <- "black" bk_clr <- "white" bp3 <- ggplot(df[df$machine=="Machine1",], aes(x=clone, y=value)) + geom_boxplot(coef=1, outlier.shape=NA, lwd=0.3) + geom_point(size=1.8, alpha=0.9) + ggtitle("Machine 1") + expand_limits(y=c(0.001,10^5)) + facet_wrap(~ donor, nrow=1, scales="free_x") + scale_y_log10(expand = c(0, 0)) + theme(axis.text.x= element_text(size=rel(1), color = ln_clr, angle=45, hjust=1), panel.spacing = unit(0.25, "lines"), axis.title.x= element_blank(), plot.title = element_text(hjust=0.5), strip.text.x = element_text(size=rel(1), face="bold", colour = ln_clr), strip.background = element_rect(colour = ln_clr, fill = bk_clr, size = 1), axis.line.x= element_line(size = 1.25, colour = ln_clr), axis.line.y= element_line(size = 1.25, colour = ln_clr), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_rect(fill = bk_clr), panel.border = element_blank(), plot.background = element_rect(fill = bk_clr)) bp4 <- ggplot(df[df$machine=="Machine2",], aes(x=clone, y=value)) + geom_boxplot(coef=1, outlier.shape=NA, lwd=0.3) + geom_point(size=1.8, alpha=0.9) + ggtitle("Machine 2") + expand_limits(y=c(0.001,10^5)) + facet_wrap(~ donor, nrow=1, scales="free_x") + scale_y_log10(expand = c(0, 0)) + theme(axis.text.x= element_text(size=rel(1), colour = ln_clr, angle=45, hjust=1), panel.spacing = unit(0.25, "lines"), plot.title = element_text(hjust=0.5), strip.text.x = element_text(size=rel(1), face="bold", colour = ln_clr), strip.background = element_rect(colour = ln_clr, fill = bk_clr, size = 1), axis.line.x= element_line(size = 1.25, colour = ln_clr), axis.line.y= element_line(size = 1.25, colour = ln_clr), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_rect(fill = bk_clr), panel.border = element_blank(), plot.background = element_rect(fill = bk_clr)) bp5 <- ggplot(df[df$machine=="Machine3",], aes(x=clone, y=value)) + geom_boxplot(coef=1, outlier.shape=NA, lwd=0.3) + geom_point(size=1.8, alpha=0.9) + ggtitle("Machine 3") + expand_limits(y=c(0.001,10^5)) + facet_wrap(~ donor, nrow=1, scales="free_x") + scale_y_log10(expand = c(0, 0)) + theme(panel.spacing = unit(0.25, "lines"), axis.title.y= element_blank(), axis.title.x= element_blank(),axis.line.y= element_blank(), axis.text.y=element_blank(), axis.text.x= element_text(size=rel(1), colour = ln_clr, angle=45, hjust=1), axis.ticks.y=element_blank(), plot.title = element_text(hjust=0.5), strip.text.x = element_text(size=rel(1), face="bold", colour = ln_clr), strip.background = element_rect(colour = ln_clr, fill = bk_clr, size = 1), axis.line.x= element_line(size = 1.25, colour = ln_clr), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_rect(fill = bk_clr), panel.border = element_blank(), plot.background = element_rect(fill = bk_clr)) bp6 <- ggplot(df[df$machine=="Machine4",], aes(x=clone, y=value)) + geom_boxplot(coef=1, outlier.shape=NA, lwd=0.3) + geom_point(size=1.8, alpha=0.9) + ggtitle("Machine 4") + expand_limits(y=c(0.001,10^5)) + facet_wrap(~ donor, nrow=1, scales="free_x") + scale_y_log10(expand = c(0, 0)) + theme(axis.text.x= element_text(size=rel(1), colour = ln_clr, angle=45, hjust=1), panel.spacing = unit(0.25, "lines"), plot.title = element_text(hjust=0.5), strip.text.x = element_text(size=rel(1), face="bold", colour = ln_clr), strip.background = element_rect(colour = ln_clr, fill = bk_clr, size = 1), axis.line.x= element_line(size = 1.25, colour = ln_clr), axis.line.y= element_blank(), axis.text.y=element_blank(), axis.ticks.y=element_blank(), axis.title.y= element_blank(), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_rect(fill = bk_clr), panel.border = element_blank(), plot.background = element_rect(fill = bk_clr)) # Plot all 4 graphs and saves them as a output file png(filename="graph3.png", width= 9, height= 7.5, units = "in", res=600) multiplot(bp3, bp4, bp5, bp6, cols=2) dev.off() 程序将安装名称为tclsh;使用tclsh8.4查找实际位置。这使得在一个系统上使用多个版本的Tcl变得更加容易。但是,如果要将其设为默认值,则应使用update-alternatives。尝试输入此内容(在根提示符处或通过which tclsh8.4):

sudo

您可能还需要update-alternatives --config tclsh 的类似内容(默认安装为wish)。