TransWikia.com

Unmet dependecies during OSM installation

Ask Ubuntu Asked by Marievi on January 24, 2021

I am following the instructions described here in order to install OSM. Specifically I run the commands:

wget https://osm-download.etsi.org/ftp/osm-5.0-five/install_osm.sh
chmod +x install_osm.sh
./install_osm.sh

where script install_osm.sh is:

#!/bin/bash
REPOSITORY_BASE=https://osm-download.etsi.org/repository/osm/debian
RELEASE=ReleaseFIVE
REPOSITORY=stable

add_repo() {
  REPO_CHECK="^$1"
  grep "${REPO_CHECK/[arch=amd64]/\[arch=amd64\]}" /etc/apt/sources.list > /dev/null 2>&1
  if [ $? -ne 0 ]
  then
    need_packages_lw="software-properties-common apt-transport-https"
    echo -e "Checking required packages: $need_packages_lw"
    dpkg -l $need_packages_lw &>/dev/null 
      || ! echo -e "One or several required packages are not installed. Updating apt cache requires root privileges." 
      || sudo apt-get -q update 
      || ! echo "failed to run apt-get update" 
      || exit 1
    dpkg -l $need_packages_lw &>/dev/null 
      || ! echo -e "Installing $need_packages_lw requires root privileges." 
      || sudo apt-get install -y $need_packages_lw 
      || ! echo "failed to install $need_packages_lw" 
      || exit 1
    wget -qO - $REPOSITORY_BASE/$RELEASE/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add -
    sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$1" && sudo DEBIAN_FRONTEND=noninteractive apt-get update
    return 0
  fi

  return 1
}

add_repo "deb [arch=amd64] $REPOSITORY_BASE/$RELEASE $REPOSITORY devops"
sudo DEBIAN_FRONTEND=noninteractive apt-get -q update
sudo DEBIAN_FRONTEND=noninteractive apt-get install osm-devops
/usr/share/osm-devops/installers/full_install_osm.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D /usr/share/osm-devops -t latest "$@"

However, the output I get is:

Checking required packages: software-properties-common apt-transport-https
OK
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease   
Hit:3 http://gr.archive.ubuntu.com/ubuntu xenial InRelease          
Hit:4 http://archive.canonical.com xenial InRelease                 
Hit:5 http://gr.archive.ubuntu.com/ubuntu xenial-updates InRelease      
Hit:6 https://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR stable InRelease
Hit:7 http://gr.archive.ubuntu.com/ubuntu xenial-backports InRelease    
Get:8 https://osm-download.etsi.org/repository/osm/debian/ReleaseFIVE stable InRelease [12,2 kB]
Ign:9 http://dl.google.com/linux/talkplugin/deb stable InRelease               
Hit:10 http://dl.google.com/linux/chrome/deb stable Release
Hit:11 http://dl.google.com/linux/talkplugin/deb stable Release
Get:12 https://osm-download.etsi.org/repository/osm/debian/ReleaseFIVE stable/devops amd64 Packages [482 B]
Fetched 12,7 kB in 1s (9585 B/s)                           
Reading package lists... Done
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://gr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.canonical.com xenial InRelease
Hit:4 http://gr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:5 http://dl.google.com/linux/talkplugin/deb stable InRelease
Hit:6 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable Release
Hit:8 http://gr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:9 https://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR stable InRelease
Hit:10 http://dl.google.com/linux/talkplugin/deb stable Release
Hit:11 https://osm-download.etsi.org/repository/osm/debian/ReleaseFIVE stable InRelease
Reading package lists...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 click : Depends: python3-click (= 0.4.21.1ubuntu0.2) but 6.2-2ubuntu1 is to be installed
 click-apparmor : Depends: python3-apparmor-click (= 0.2ubuntu1) but 0.3.13.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
./install_osm.sh: line 34: /usr/share/osm-devops/installers/full_install_osm.sh: No such file or directory

I have tried the command suggested: apt-get -f install but I get:

(Reading database ... 1443312 files and directories currently installed.)
Preparing to unpack .../click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb ...
router configuration specified twice
Usage: click [OPTION]... [ROUTERFILE]
Try 'click --help' for more information.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
router configuration specified twice
Usage: click [OPTION]... [ROUTERFILE]
Try 'click --help' for more information.
dpkg: error processing archive /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Preparing to unpack .../click-apparmor_0.3.13.1_amd64.deb ...
invoke-rc.d: click-apparmor.service doesn't exist but the upstart job does. Nothing to start or stop until a systemd or init job is present.
router configuration specified twice
Usage: click [OPTION]... [ROUTERFILE]
Try 'click --help' for more information.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
router configuration specified twice
Usage: click [OPTION]... [ROUTERFILE]
Try 'click --help' for more information.
dpkg: error processing archive /var/cache/apt/archives/click-apparmor_0.3.13.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb
 /var/cache/apt/archives/click-apparmor_0.3.13.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried to run:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb

And I get:

(Reading database ... 1443312 files and directories currently installed.)
Preparing to unpack .../click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb ...
router configuration specified twice
Usage: click [OPTION]... [ROUTERFILE]
Try 'click --help' for more information.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
router configuration specified twice
Usage: click [OPTION]... [ROUTERFILE]
Try 'click --help' for more information.
dpkg: error processing archive /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb (--install):
 subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb

Any ideas what may be happening and how to solve it?

One Answer

I had a similar issue, solved it by following the instructions given in this answer: https://askubuntu.com/a/616990/68804

It essentially consists in:

  • manually removing all click folders from /usr/local/lib/pythonX.Y/dist-packages (there can be several; I had to do it both in /usr/local/lib/python2.7/dist-packages and /usr/local/lib/python3.4/dist-packages);
  • then running sudo apt-get update && sudo apt-get install -f.

Answered by Bertrand Moreau on January 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP