New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18.04 installs 8.x from main repos instead of 6.x from nodesource #657

Closed
0xCMP opened this Issue May 4, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@0xCMP

0xCMP commented May 4, 2018

When I setup the 6.x nodesource repo it installs the 8.x "latest" from the main repos. While not a huge problem, I expected nodesource's node which includes npm.

I can't install node 6.x without specifying the version, which isn't horrible (I'm using salt and it's easy), but it's not what I expected.

@0xCMP 0xCMP changed the title from Ubuntu installs 8.x from main repos instead of 6.x from nodesource to Ubuntu 18.04 installs 8.x from main repos instead of 6.x from nodesource May 4, 2018

@0xCMP

This comment has been minimized.

0xCMP commented May 4, 2018

If you add the following to your /etc/apt/preferences file you can prioritize whatever nodesource repos you have setup over the existing main ubuntu ones

Package: *
Pin: origin deb.nodesource.com
Pin-Priority: 600

Verify it's picking the right nodejs by using apt-cache policy nodejs.

If you already have a newer version installed from the Ubuntu repo apt-get remove it first and then just try to apt-get install nodejs.

@chrislea

This comment has been minimized.

Contributor

chrislea commented May 4, 2018

Yeah, there's really no way around that, that's just how apt works. We actually didn't mean to ever make 6.x packages for 18.04 but it looks like we did by accident. The pinning solution @0xCMP recommends is the best way to handle this that I know of.

@chrislea chrislea closed this May 4, 2018

sonicdoe added a commit to sonicdoe/distributions that referenced this issue Jun 15, 2018

@sonicdoe

This comment has been minimized.

Contributor

sonicdoe commented Jun 15, 2018

Two minor suggestions: Limit the pinning to the nodejs package and create a separate file.

For example, in /etc/apt/preferences.d/nodesource:

Package: nodejs
Pin: origin deb.nodesource.com
Pin-Priority: 600

I’ve also opened pull request #684 to add an FAQ entry regarding this issue.

chrislea added a commit that referenced this issue Jun 15, 2018

Merge pull request #684 from sonicdoe/patch-1
Add FAQ entry for issue #657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment