如何在OpenFOAM docker-machine上安装软件包 - boot2docker:bash:tce-load:command not found

时间:2018-01-23 19:08:31

标签: boot2docker openfoam tiny-core-linux

我试图在the OpenFOAM docker-machine image上安装一些基于boot2docker的软件包。运行uname -a命令时,我收到信息:

  

Linux默认4.4.111-boot2docker#1 SMP 1月11日16:25:31 UTC 2018 x86_64 x86_64 x86_64 GNU / Linux

this page中已经解释过boot2docker发行版基于Tiny Core Linux发行版,因此要安装包必须:

  1. 检查the Tiny Core Linux software repository page
  2. 使用命令tce-load -w -i packagename.tcz安装
  3. 我按照以下步骤安装git。但是我得到了错误:

      

    bash:tce-load:找不到命令

    我搜索并按照here解释显然官方存储库处于脱机状态。提供了a list of mirrors。但我不知道如何从这些镜像安装包!

    P.S。另外,OP的a bizarre answer已被提升,但通过运行boot2docker ssh

    并不清楚他/她的意思

    如果你能帮助我知道问题是什么以及我如何解决它,我将不胜感激。

1 个答案:

答案 0 :(得分:0)

new/correct:

Thanks to Pawan Ghildiyal from ESI Group and Karen Kettle from OpenCFD Limited I found the correct solution.

It seems like the whole OpenFOAM docker image is based on CentOS not boot2docker and one can easily install new packages using yum! Because the small virtual box interface that enable docker to run is named as boot2docker it returns as boot2docker when asked by uname -a. you just need to use the root user in docker terminal:

  1. run Docker QuickStart Terminal (I'm using windows)
  2. docker start of_1712
  3. docker exec -ti of_1712 /bin/bash
  4. su - and then the default password, in this case fuser2017!
  5. yum install packageName

old/wrong:

As explained here it turns out that Docker deprecates the Boot2Docker command line in favor of docker-machine. So the answer provided here is also depreciated.

Solution:

  1. Using the command docker-machine ssh machinename (in my case machinename is default) connect to the docker-machine image.
  2. As explained here run the command version and look for the package name in the right repository. in my case the version is 8.2.1 and the repository is http://repo.tinycorelinux.net/8.x/x86/tcz/

  3. then run the command tce-load -w -i packagename.tcz.

For some reason the official OpenFOAM_Start batch file provided by the OpenFOAM team does not work!