I'm trying to install npm in a debian VM running
sudo apt-get install -y npm
But I'm getting this error msg, how can I solve this?
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:
npm : Depends: nodejs (>= 6.11~) but it is not going to be installed
Depends: node-abbrev (>= 1.1.1~) but it is not going to be installed
Depends: node-ansi-regex (>= 3.0~) but it is not going to be installed
Depends: node-ansistyles (>= 0.1.3~) but it is not going to be installed
Depends: node-aproba (>= 1.2~) but it is not going to be installed
Depends: node-archy (>= 1.0~) but it is not going to be installed
Depends: node-cacache (>= 10.0.4~) but it is not going to be installed
Depends: node-bluebird (>= 3.5.1~) but it is not going to be installed
Depends: node-call-limit (>= 1.1~) but it is not going to be installed
Depends: node-chownr (>= 1.0.1~) but it is not going to be installed
Depends: node-config-chain (>= 1.1.11~) but it is not going to be installed
Depends: node-detect-indent (>= 5.0~) but it is not going to be installed
Depends: node-detect-newline (>= 2.1~) but it is not going to be installed
Depends: node-editor (>= 1.0~) but it is not going to be installed
Depends: node-fs-vacuum (>= 1.2.10~) but it is not going to be installed
Depends: node-fs-write-stream-atomic (>= 1.0.10~) but it is not going to be installed
Depends: node-glob (>= 7.1.2~) but it is not going to be installed
Depends: node-graceful-fs (>= 4.1.11~) but it is not going to be installed
Depends: node-has-unicode (>= 2.0.1~) but it is not going to be installed
Depends: node-hosted-git-info (>= 2.6~) but it is not going to be installed
Depends: node-iferr (>= 0.1.5~) but it is not going to be installed
Depends: node-inflight (>= 1.0.6~) but it is not going to be installed
Depends: node-inherits (>= 2.0.3~) but it is not going to be installed
Depends: node-ini (>= 1.3.5~) but it is not going to be installed
Depends: node-npm-package-arg but it is not going to be installed
Depends: node-promzard but it is not going to be installed
Depends: node-jsonstream (>= 1.3.2~) but it is not going to be installed
Depends: node-json-parse-better-errors (>= 1.0.1~) but it is not going to be installed
Depends: node-lazy-property (>= 1.0~) but it is not going to be installed
Depends: node-libnpx (>= 10.0.1~) but it is not going to be installed
Depends: node-lockfile (>= 1.0.3~) but it is not going to be installed
Depends: node-lru-cache (>= 4.1.1~) but it is not going to be installed
Depends: node-mississippi (>= 3.0~) but it is not going to be installed
Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
Depends: node-move-concurrently (>= 1.0.1~) but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-normalize-package-data (>= 2.4~) but it is not going to be installed
Depends: node-gyp (>= 3.6.2~) but it is not going to be installed
Depends: node-resolve-from (>= 4.0~) but it is not going to be installed
Depends: node-encoding but it is not going to be installed
Depends: node-errno but it is not going to be installed
Depends: node-npmlog (>= 4.1.2~) but it is not going to be installed
Depends: node-once (>= 1.4~) but it is not going to be installed
Depends: node-opener (>= 1.4.3~) but it is not going to be installed
Depends: node-osenv (>= 0.1.5~) but it is not going to be installed
Depends: node-path-is-inside (>= 1.0.2~) but it is not going to be installed
Depends: node-promise-inflight (>= 1.0.1~) but it is not going to be installed
Depends: node-ansi but it is not going to be installed
Depends: node-qw (>= 1.0.1~) but it is not going to be installed
Depends: node-read (>= 1.0.7~) but it is not going to be installed
Depends: node-read-package-json (>= 2.0.13~) but it is not going to be installed
Depends: node-request (>= 2.83~) but it is not going to be installed
Depends: node-retry (>= 0.10.1~) but it is not going to be installed
Depends: node-rimraf (>= 2.6.2~) but it is not going to be installed
Depends: node-safe-buffer (>= 5.1.1~) but it is not going to be installed
Depends: node-semver (>= 5.5~) but it is not going to be installed
Depends: node-sha (>= 2.0.1~) but it is not going to be installed
Depends: node-slide (>= 1.1.6~) but it is not going to be installed
Depends: node-sorted-object (>= 2.0.1~) but it is not going to be installed
Depends: node-from2 but it is not going to be installed
Depends: node-stream-iterate but it is not going to be installed
Depends: node-ssri (>= 5.2.4~) but it is not going to be installed
Depends: node-strip-ansi (>= 4.0~) but it is not going to be installed
Depends: node-tar (>= 4.4~) but it is not going to be installed
Depends: node-text-table (>= 0.2~) but it is not going to be installed
Depends: node-uid-number (>= 0.0.6~) but it is not going to be installed
Depends: node-unique-filename (>= 1.1~) but it is not going to be installed
Depends: node-unpipe (>= 1.0~) but it is not going to be installed
Depends: node-boxen (>= 1.2.1~) but it is not going to be installed
Depends: node-import-lazy but it is not going to be installed
Depends: node-is-npm (>= 1.0~) but it is not going to be installed
Depends: node-latest-version (>= 3.0~) but it is not going to be installed
Depends: node-semver-diff (>= 2.0~) but it is not going to be installed
Depends: node-xdg-basedir (>= 3.0~) but it is not going to be installed
Depends: node-validate-npm-package-name (>= 3.0~) but it is not going to be installed
Depends: node-which (>= 1.3~) but it is not going to be installed
Depends: node-wrappy (>= 1.0.2~) but it is not going to be installed
Depends: node-write-file-atomic (>= 2.3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
This solved:
curl -L https://npmjs.org/install.sh | sudo sh
I have erlang 21.3 installed:
$ erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
"21"
But the rabbitmq installer does not think so:
sudo apt-get install -y rabbitmq-server
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:
rabbitmq-server : Depends: erlang-base (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
erlang-base-hipe (>= 1:21.3) but it is not going to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-crypto (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-eldap (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-inets (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-mnesia (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-os-mon (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-parsetools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-public-key (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-runtime-tools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-ssl (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-syntax-tools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-tools (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
Depends: erlang-xmerl (>= 1:21.3) but 1:20.2.2+dfsg-1ubuntu2 is to be installed or
esl-erlang (>= 1:21.3) but it is not installable
E: Unable to correct problems, you have held broken packages.
Note: the following question is similar - but for RedHat and the yum install instructions are not directly applicable for apt-get Installing RabbitMQ on Red Hat - wrong Erlang version
What needs to be done to fix this installation process? I am on ubuntu 18.0.4.
The following sequence of commands will install Erlang and RabbitMQ on Ubuntu 18, as documented here:
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install curl gnupg -y
curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | apt-key add -
apt-get install apt-transport-https
tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF
deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang
deb https://dl.bintray.com/rabbitmq/debian bionic main
EOF
apt-get update -y
apt-get install rabbitmq-server -y --fix-missing
until lsof -i:5672; do echo "Waiting for RabbitMQ to start..."; sleep 1; done
rabbitmq-plugins enable rabbitmq_management
If you choose to install Erlang from source you're on your own and I suggest using the generic-unix RabbitMQ package.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
Encountered similar scenario recently while installing rabbitmq. Installing erlang using PPA
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install erlang
sudo apt-get install esl-erlang
as described here worked for me
I experienced similar issue while installing elixir. I believe the reason is an existing installation of erlang is blocking the installation of required versions of erlang offered by two different packages.
For me, installing esl-erlang along with elixir solved the issue, e.g., sudo apt-get install elixir esl-erlang. So, you might want to explicitly install the required version of erlang-base or esl-erlang.
While installing RabbitMq 3.11.7 / Erlang OTP 25 / Ubuntu 20.04 received this set of errors
The following packages have unmet dependencies: rabbitmq-server : Depends: erlang-base (>= 1:25.0) but 1:22.2.7+dfsg-1 is to be installed..
Resolved by following Cloudsmith Quick Start Script at
https://www.rabbitmq.com/install-debian.html
This means installing both Erlang and RabbitMq Repositories.
The error was resolved after these steps were put in sequence.
#!/usr/bin/sh
sudo apt-get install curl gnupg apt-transport-https -y
## Team RabbitMQ's main signing key
curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null
## Cloudsmith: modern Erlang repository
curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/io.cloudsmith.rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null
## Cloudsmith: RabbitMQ repository
curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/io.cloudsmith.rabbitmq.9F4587F226208342.gpg > /dev/null
## Add apt repositories maintained by Team RabbitMQ
sudo tee /etc/apt/sources.list.d/rabbitmq.list <<EOF
## Provides modern Erlang/OTP releases
##
deb [signed-by=/usr/share/keyrings/io.cloudsmith.rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/ubuntu bionic main
deb-src [signed-by=/usr/share/keyrings/io.cloudsmith.rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/ubuntu bionic main
## Provides RabbitMQ
##
deb [signed-by=/usr/share/keyrings/io.cloudsmith.rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/ubuntu bionic main
deb-src [signed-by=/usr/share/keyrings/io.cloudsmith.rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/ubuntu bionic main
EOF
## Update package indices
sudo apt-get update -y
## Install Erlang packages
sudo apt-get install -y erlang-base \
erlang-asn1 erlang-crypto erlang-eldap erlang-ftp erlang-inets \
erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key \
erlang-runtime-tools erlang-snmp erlang-ssl \
erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl
## Install rabbitmq-server and its dependencies
sudo apt-get install rabbitmq-server -y --fix-missing
Following the installation of RVM, I'm getting error listed below.
Error running 'requirements_debian_libs_install gawk libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgmp-dev libgdbm-dev libncurses5-dev automake libtool bison libffi-dev',
showing last 15 lines of /home/aldrien/.rvm/log/1486780247_ruby-2.3.3/package_install_gawk_libreadline6-dev_zlib1g-dev_libssl-dev_libyaml-dev_libsqlite3-dev_sqlite3_autoconf_libgmp-dev_libgdbm-dev_libncurses5-dev_automake_libtool_bison_libffi-dev.log
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:
libncurses5-dev : Depends: libtinfo5 (= 6.0+20151024-2ubuntu2) but 6.0+20160213-1ubuntu1 is to be installed
Depends: libncurses5 (= 6.0+20151024-2ubuntu2) but 6.0+20160213-1ubuntu1 is to be installed
Depends: libtinfo-dev (= 6.0+20151024-2ubuntu2) but it is not going to be installed
libreadline6-dev : Depends: libtinfo-dev but it is not going to be installed
libsqlite3-dev : Depends: libsqlite3-0 (= 3.10.2-1) but 3.11.0-1ubuntu1 is to be installed
libssl-dev : Depends: libssl1.0.0 (= 1.0.2f-2ubuntu1) but 1.0.2g-1ubuntu4.1 is to be installed
sqlite3 : Depends: libsqlite3-0 (= 3.10.2-1) but 3.11.0-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
++ /scripts/functions/utility : __rvm_try_sudo() 381 > return 100
++ /scripts/functions/requirements/ubuntu : requirements_debian_libs_install() 36 > return 100
Please help!
sudo apt-get install npm
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:
npm : Depends: nodejs but it is not going to be installed
Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
Depends: node-ansi but it is not going to be installed
Depends: node-archy but it is not going to be installed
Depends: node-block-stream but it is not going to be installed
Depends: node-fstream (>= 0.1.22) but it is not going to be installed
Depends: node-fstream-ignore but it is not going to be installed
Depends: node-github-url-from-git but it is not going to be installed
Depends: node-glob (>= 3.1.21) but it is not going to be installed
Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
Depends: node-inherits but it is not going to be installed
Depends: node-ini (>= 1.1.0) but it is not going to be installed
Depends: node-lockfile but it is not going to be installed
Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed
Depends: node-minimatch (>= 0.2.11) but it is not going to be installed
Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
Depends: node-gyp (>= 0.10.9) but it is not going to be installed
Depends: node-nopt (>= 2.1.1) but it is not going to be installed
Depends: node-npmlog but it is not going to be installed
Depends: node-once but it is not going to be installed
Depends: node-osenv but it is not going to be installed
Depends: node-read but it is not going to be installed
Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed
Depends: node-request (>= 2.25.0) but it is not going to be installed
Depends: node-retry but it is not going to be installed
Depends: node-rimraf (>= 2.2.2) but it is not going to be installed
Depends: node-semver (>= 2.1.0) but it is not going to be installed
Depends: node-sha but it is not going to be installed
Depends: node-slide but it is not going to be installed
Depends: node-tar (>= 0.1.18) but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
make sure that the repo sources are up to date
sudo apt-get update
and then
sudo apt-get install npm
if you still have dependency problems then
sudo apt-get install -f
this will only install the missing dependency
I executed following commands to load passenger module:
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger jessie main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2 libapache2-mod-passenger
I got following errors:
The following packages have unmet dependencies:
libapache2-mod-passenger : Depends: libstdc++6 (>= 4.9) but 4.7.2-2ubuntu1 is to be installed
Depends: apache2-api-20120211 but it is not installable
Depends: passenger (= 1:5.0.26-1~jessie1) but it is not going to be installed
How to fix these errors?