Upgrade to Nodejs 8 and "error: failed to commit transaction"

I am trying to upgrade my nodejs 6 to 8 in my linux arch. So I did:

$ sudo pacman -S nodejs npm

      

Result:

resolving dependencies...
looking for conflicting packages...

Packages (3) openssl-1.0-1.0.2.l-1  nodejs-8.1.3-1  npm-4.6.1-1

Total Installed Size:  39.22 MiB
Net Upgrade Size:       6.79 MiB

:: Proceed with installation? [Y/n] y
(3/3) checking keys in keyring                                                                                    [####################################################################] 100%
(3/3) checking package integrity                                                                                  [####################################################################] 100%
(3/3) loading package files                                                                                       [####################################################################] 100%
(3/3) checking for file conflicts                                                                                 [####################################################################] 100%
error: failed to commit transaction (conflicting files)
openssl-1.0: /usr/lib/libcrypto.so.1.0.0 exists in filesystem
openssl-1.0: /usr/lib/libssl.so.1.0.0 exists in filesystem
Errors occurred, no packages were upgraded.

      

And now my knots are broken, I guess!

$ node --version
node: error while loading shared libraries: libhttp_parser.so.2.7.1: cannot open shared object file: No such file or directory

      

Any ideas what should I do now?

+3


source to share


1 answer


I had the same problem and this is how I solve it:

sudo pacman -S nodejs npm --force

      

Option --force will update your package even if you get a warning with existing files.

After that, you need to install http-parser with pacman so that:

sudo pacman -S http-parser --force

      



Finally, node -v will give you this error:

when loading shared libraries: libicui18n.so.59: Unable to open shared objects file: No such file or directory

To fix this, install the icu lib from pacman:

sudo pacman -S icu --force

      

Here we go, your node version is now v8.4.0.

+1


source







All Articles