nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.48k stars 284 forks source link

Unable to upgrade to v8.8.0 #924

Closed ghost closed 7 years ago

ghost commented 7 years ago

System

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Pop!_OS 17.10 (Artful Aardvark)"
4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017

Issue

Steps Attempted to Resolve


Output

In spite of the workarounds that I have tried, this is the consistent output that I get.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.5 MB of archives.
After this operation, 57.8 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_8.x artful/main amd64 nodejs amd64 8.8.0-1nodesource1 [12.5 MB]
Fetched 12.5 MB in 0s (17.3 MB/s)
(Reading database ... 234340 files and directories currently installed.)
Preparing to unpack .../nodejs_8.8.0-1nodesource1_amd64.deb ...
Unpacking nodejs (8.8.0-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_8.8.0-1nodesource1_amd64.deb (--unpack):
 unable to open '/usr/bin/node.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_8.8.0-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done

Node.js event-based server-side javascript engine
 Node.js is similar in design to and influenced by systems like
 Ruby's Event Machine or Python's Twisted.
 .
 It takes the event model a bit further - it presents the event
 loop as a language construct instead of as a library.
 .
 Node.js is bundled with several useful libraries to handle server tasks :
 System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
 HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Do you want to install the software package? [y/N]:y
(Reading database ... 234340 files and directories currently installed.)
Preparing to unpack nodejs_8.8.0-1nodesource1_amd64.deb ...
Unpacking nodejs (8.8.0-1nodesource1) ...
dpkg: error processing archive nodejs_8.8.0-1nodesource1_amd64.deb (--install):
 unable to open '/usr/bin/node.dpkg-new': Operation not permitted
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 nodejs_8.8.0-1nodesource1_amd64.deb
addaleax commented 7 years ago

This sounds really weird – can you try removing '/usr/bin/node.dpkg-new and/or show which permissions the file has (ls -l '/usr/bin/node.dpkg-new)?

ghost commented 7 years ago

Output for ls -l /usr/bin/node.dpkg-new:

ls: cannot access '/usr/bin/node.dpkg-new': No such file or directory

What makes it even more unusual is that I was already running as su.

This may be far-fetched. But does this have something to do with Ubuntu 17.10 being new?

ghost commented 7 years ago

I was able to install the update by building from source. It took a while to compile but it worked. :relieved:

I still don't understand why it wouldn't install using other means.

addaleax commented 7 years ago

@xanlaeron In any case, there are also tarballs with compiled binaries available for Linux.

I really don’t know why this would happen either.

garaboncias commented 7 years ago

I have the same issue on Debian Stretch with 8.9.0 and with 8.9.1 however i can install with this option: sudo dpkg --force-unsafe-io -i /var/cache/apt/archives/nodejs_8.9.1-1nodesource1_amd64.deb