From c92a300bd8bee05144add05365e24b6cb2db82e7 Mon Sep 17 00:00:00 2001 From: Zhoneym <140673973+Zhoneym@users.noreply.github.com> Date: Wed, 19 Feb 2025 16:37:18 +0800 Subject: [PATCH] Necessary tips for Node.js related issues --- doc/en/api/server/website.md | 14 ++++++++++++++ doc/en/install.md | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/en/api/server/website.md b/doc/en/api/server/website.md index bd380cd..a057898 100644 --- a/doc/en/api/server/website.md +++ b/doc/en/api/server/website.md @@ -8,6 +8,20 @@ This document provides the necessary steps to set up and run the web service for Before you can compile the web code, make sure you have installed [Node.js](https://nodejs.org) version 18.3 or higher +Note: The version of Node.js in the Ubuntu or Debian GNU/Linux software repository is too low, causing compilation errors. Users can also install Node.js through the Nodesource repository, provided they uninstall the outdated version first. + +```bash + + # sudo apt-get remove nodejs npm -y && sudo apt-get autoremove -y + sudo apt-get update -y && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg + sudo chmod 644 /usr/share/keyrings/nodesource.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_23.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list + sudo apt-get update -y + sudo apt-get install nodejs -y + +``` + Once npm is installed, navigate to the `ktransformers/website` directory: ```bash diff --git a/doc/en/install.md b/doc/en/install.md index 7abb6c2..b51c54f 100644 --- a/doc/en/install.md +++ b/doc/en/install.md @@ -27,11 +27,11 @@ Some preparation: fi ``` -- Linux-x86_64 with gcc, g++ and cmake +- Linux-x86_64 with gcc, g++ and cmake (using Ubuntu as an example) ```sh sudo apt-get update - sudo apt-get install gcc g++ cmake ninja-build + sudo apt-get install build-essential cmake ninja-build ``` - We recommend using [Miniconda3](https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh) or [Anaconda3](https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh) to create a virtual environment with Python=3.11 to run our program. Assuming your Anaconda installation directory is `~/anaconda3`, you should ensure that the version identifier of the GNU C++standard library used by Anaconda includes `GLIBCXX-3.4.32`