
Ich folge den beschriebenen AnweisungenHierum OSM zu installieren. Konkret führe ich die Befehle aus:
wget https://osm-download.etsi.org/ftp/osm-5.0-five/install_osm.sh
chmod +x install_osm.sh
./install_osm.sh
wobei das Skript install_osm.sh
lautet:
#!/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 "$@"
Die Ausgabe, die ich erhalte, ist jedoch:
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
Ich habe den vorgeschlagenen Befehl ausprobiert, apt-get -f install
erhalte jedoch Folgendes:
(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)
Ich habe auch versucht, Folgendes auszuführen:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb
Und ich bekomme:
(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
Irgendwelche Ideen, was passiert sein könnte und wie man das Problem lösen kann?
Antwort1
Ich hatte ein ähnliches Problem und habe es gelöst, indem ich die Anweisungen in dieser Antwort befolgt habe:https://askubuntu.com/a/616990/68804
Es besteht im Wesentlichen aus:
- manuelles Entfernen aller
click
Ordner aus/usr/local/lib/pythonX.Y/dist-packages
(es können mehrere sein; ich musste dies sowohl in/usr/local/lib/python2.7/dist-packages
als auch in tun/usr/local/lib/python3.4/dist-packages
); - dann laufen
sudo apt-get update && sudo apt-get install -f
.