まずNode.jsがCoreserverで使えるのか?
標準状態ではインストールされていないし、root権限がないので通常のインストールもできない。
いろいろ調べてみると、nvm (Node Version Manager )を介するとユーザーごとにユーザー権限でインストールし、シェルごとに起動することができるらしいので、まずはこれを試してみる。
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 15037 100 15037 0 0 42126 0 --:--:-- --:--:-- --:--:-- 42120 => Downloading nvm from git to '/virtual/kkuro/.nvm' => Cloning into '/virtual/kkuro/.nvm'... remote: Enumerating objects: 355, done. remote: Counting objects: 100% (355/355), done. remote: Compressing objects: 100% (302/302), done. remote: Total 355 (delta 39), reused 168 (delta 28), pack-reused 0 Receiving objects: 100% (355/355), 208.47 KiB | 0 bytes/s, done. Resolving deltas: 100% (39/39), done. * (detached from FETCH_HEAD) master => Compressing and cleaning up git repository => Appending nvm source string to /virtual/kkuro/.bashrc => Appending bash_completion source string to /virtual/kkuro/.bashrc => You currently have modules installed globally with `npm`. These will no => longer be linked to the active version of Node when you install a new node => with `nvm`; and they may (depending on how you construct your `$PATH`) => override the binaries of modules installed with `nvm`: /usr/lib ├── boom@0.4.2 ├── cryptiles@0.2.2 ├── hoek@0.9.1 ├── iconv-lite@0.2.11 └── xmldom@0.1.19 => If you wish to uninstall them at a later point (or re-install them under your => `nvm` Nodes), you can remove them from the system Node as follows: $ nvm use system $ npm uninstall -g a_module => Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
さてNode.jsのインストールをしよう。
$ export NVM_DIR="$HOME/.nvm" $ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm $ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion $ nvm install node Downloading and installing node v18.2.0... Downloading https://nodejs.org/dist/v18.2.0/node-v18.2.0-linux-x64.tar.xz... ######################################################################## 100.0% Computing checksum with sha256sum Checksums matched! Now using node v18.2.0 (npm v) Creating default alias: default -> node (-> v18.2.0)
すんなり入ったっぽい?
$ node -v node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node) $ npm -v node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
ありゃgccのバージョンが足らんのかも
$ nvm uninstall node $ nvm ls-remote Uninstalled node v18.2.0 v0.1.14 v0.1.15 v0.1.16 v0.1.17 ........ v16.13.0 (LTS: Gallium) v16.13.1 (LTS: Gallium) v16.13.2 (LTS: Gallium) v16.14.0 (LTS: Gallium) v16.14.1 (LTS: Gallium) v16.14.2 (LTS: Gallium) v16.15.0 (Latest LTS: Gallium) v17.0.0 v17.0.1 v17.1.0 v17.2.0 v17.3.0 v17.3.1 v17.4.0 v17.5.0 v17.6.0 v17.7.0 v17.7.1 v17.7.2 v17.8.0 v17.9.0 v18.0.0 v18.1.0 v18.2.0
となっているので最新版じゃなくてv16.15.0にしてみる
$ nvm install 16 Downloading and installing node v16.15.0... Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0-linux-x64.tar.xz... ######################################################################## 100.0% Computing checksum with sha256sum Checksums matched! Now using node v16.15.0 (npm v8.5.5) $ node -v v16.15.0
OK
とまあとりあえずNode.jsを使えそうなところまでは来たのだけれど、Jbrowseはサーバなのでポートを自由に扱えない限り運用は難しいかも。