Search code examples
node.jsconfigurationcpanelconflictwhm

how to install nodejs v16 on whm


i want enable nodejs16 on whm but enter image description here The following conflicts are installed on this machine. They will be removed as part of this package selection:

nodejs10

and When I execute the following command node -v

output:

node: error while loading shared libraries: libbrotlidec.so.1: cannot open shared object   file: No such file or directory

If I enable it, there will be a problem how can i uninstall old nodejs or upgrade it to new version?


Solution

  • I would always install NodeJS using the package manager of your operating system, instead of using the pre-defined package through EA4. For example, to install Node version 16, you can simply use the following commands:

    yum install -y gcc-c++ make curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -

    yum install nodejs

    But first, make sure to remove any previous packages that you may have installed. By the way, if you are looking for an even easier way to have NodeJS for your accounts or if you need to provide each account the ability to switch/set their own node version, I would suggest going for CloudLinux OS and using the NodeJS Selector that they provide.