Skip to content

Loading…

Opa installation fails on Ubuntu with nodejs v0.10.0 #114

Merged
merged 1 commit into from

2 participants

@blutack

Using the .run script as on 32bit Ubuntu 12.04.

On first run, Opa correctly adds the nodejs PPA and attempts to both the nodejs and npm packages. Nodejs now includes npm, so the attempt to install npm uses the version from the ubuntu default repositories. This conflicts with the new nodejs package.

Attached pull request removes npm package installation. I'm afraid I don't know whether Opa will actually run against v0.10.0; if not, an alternative ppa will need to be set up.

$ opa create foo
node.js is missing, Download and install it ? (no will abort) [Yn] y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-software-properties is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
You are about to add the following PPA to your system:
 Evented I/O for V8 javascript. Nodes goal is to provide an easy way to build scalable network programs
 More info: https://launchpad.net/~chris-lea/+archive/node.js
Press [ENTER] to continue or ctrl-c to cancel adding it
--SNIP---
Fetched 4,240 B in 5s (715 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 nodejs : Conflicts: npm
E: Unable to correct problems, you have held broken packages.

$ sudo apt-cache show nodejs
Package: nodejs
Priority: extra
Section: web
Installed-Size: 14641
Maintainer: Jérémy Lal <kapouer@melix.org>
Architecture: i386
Version: 0.10.0-2chl1~precise1
Replaces: nodejs-dev (<= 0.8.22), npm (<= 1.2.14)
Provides: nodejs-dev, npm
Depends: libc6 (>= 2.15), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1), rlwrap
Conflicts: nodejs-dev, npm
Filename: pool/main/n/nodejs/nodejs_0.10.0-2chl1~precise1_i386.deb
Size: 5257880
MD5sum: 03ba3e94270431e9c210bfed74a9c712
SHA1: f623f21d810b0c772be2d4f14b7a029facd2f1c6
Description-en: 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.
@blutack blutack Fix Ubuntu package installation for nodejs >0.10.0
No longer attempt to install npm from the nodejs ppa
Nodejs now includes & conflicts with the npm package.
As the ppa now only contains 0.10.0, the npm package should no longer be installed.
f977983
@Aqua-Ye
MLstate member

This might be right for the latest ubuntu, but it should also be tested with previous versions of ubuntu.

@blutack

The PPA which the script adds has updated it's packages to 0.10.0 for all versions of ubuntu supported by the ppa (which goes back to lucid, 10.04). Therefore, this fix will be required for all versions as long as this ppa is used.
The only difference will be the error; versions older than my tested precise (12.04) may not have npm packages in the ubuntu repos at all.

See https://launchpad.net/~chris-lea/+archive/node.js/ for more info
Cheers

@blutack

I would have thought having correct behaviour on precise and quantal would be priority anyway as most ubuntu users will be on one of those. Currently, opa is completely uninstallable on Ubuntu without manual intervention.

@Aqua-Ye Aqua-Ye merged commit 4f5b5fa into MLstate:master
@blutack

If Opa won't run on Node 0.10.0 my patch isn't valid.
May be better to switch to Chris Lea's node-legacy PPA temporarily. If this is done my patch should be reverted.
https://launchpad.net/~chris-lea/+archive/node.js-legacy

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 15, 2013
  1. @blutack

    Fix Ubuntu package installation for nodejs >0.10.0

    blutack committed
    No longer attempt to install npm from the nodejs ppa
    Nodejs now includes & conflicts with the npm package.
    As the ppa now only contains 0.10.0, the npm package should no longer be installed.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 tools/dependencies/launch_helper.sh
View
2 tools/dependencies/launch_helper.sh
@@ -61,7 +61,7 @@ if [ $? -ne 0 ] || [ ! -x "$node" ]; then
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
- sudo apt-get install nodejs npm
+ sudo apt-get install nodejs
;;
*)
echo "--> node.js is missing, please install node.js from: http://nodejs.org"
Something went wrong with that request. Please try again.