Problem with Landscape Server

June 3, 2016 6.3k views
Ubuntu Quickstart

Hey, I’m wondering if anyone knows how to fix an issue with packages.

When I try to use “apt-get” or “apt”, I get an issue with Landscape server and aborts the install.

I’ve tried reinstalling, using “apt -f install” and the lot.
This is the output:


  • Did you have to use a third party PPA for this install? Can you share what that was?

  • Not sure what you mean. When I installed Landscape, I used “apt-get install landscape-server-quickstart” as said on Canonical’s Landscape website.

  • Looks like landscape is already installed:

    root@projectge:~# sudo apt install landscape-server-quickstart
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    **landscape-server-quickstart is already the newest version.**

    maybe try this:

    sudo apt-get update&&sudo apt-get upgrade
  • After this operation, 38.7 MB of additional disk space will be used.
    Do you want to continue? [Y/n]
    Get:1 trusty-updates/main linux-libc-dev amd64 3.13.0-88.135 [772 kB]
    Get:2 trusty-updates/main libexpat1-dev amd64 2.1.0-4ubuntu1.3 [115 kB]
    Get:3 trusty-updates/main libexpat1 amd64 2.1.0-4ubuntu1.3 [71.1 kB]
    Get:4 trusty-updates/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.8 [573 kB]
    Get:5 trusty-updates/main wget amd64 1.15-1ubuntu1.14.04.2 [271 kB]
    Get:6 trusty-updates/main grub-pc amd64 2.02~beta2-9ubuntu1.8 [173 kB]
    Get:7 trusty-updates/main grub-pc-bin amd64 2.02~beta2-9ubuntu1.8 [879 kB]
    Get:8 trusty-updates/main grub2-common amd64 2.02~beta2-9ubuntu1.8 [501 kB]
    Get:9 trusty-updates/main grub-common amd64 2.02~beta2-9ubuntu1.8 [1,682 kB]
    Get:10 trusty-updates/main augeas-lenses all 1.2.0-0ubuntu1.2 [229 kB]
    Get:11 trusty-updates/main libaugeas0 amd64 1.2.0-0ubuntu1.2 [135 kB]
    Fetched 5,402 kB in 0s (14.5 MB/s)
    Extracting templates from packages: 100%
    Preconfiguring packages ...
    (Reading database ... 134546 files and directories currently installed.)
    Preparing to unpack .../liblcms2-2_2.5-0ubuntu4.1_amd64.deb ...
    Unpacking liblcms2-2:amd64 (2.5-0ubuntu4.1) over (2.5-0ubuntu4) ...
    Preparing to unpack .../linux-libc-dev_3.13.0-88.135_amd64.deb ...
    Unpacking linux-libc-dev:amd64 (3.13.0-88.135) over (3.13.0-87.133) ...
    Preparing to unpack .../libexpat1-dev_2.1.0-4ubuntu1.3_amd64.deb ...
    Unpacking libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) over (2.1.0-4ubuntu1.1) ...
    Preparing to unpack .../libexpat1_2.1.0-4ubuntu1.3_amd64.deb ...
    Unpacking libexpat1:amd64 (2.1.0-4ubuntu1.3) over (2.1.0-4ubuntu1.1) ...
    Preparing to unpack .../libxml2_2.9.1+dfsg1-3ubuntu4.8_amd64.deb ...
    Unpacking libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.8) over (2.9.1+dfsg1-3ubuntu4.7) ...
    Preparing to unpack .../libgd3_2.1.0-3ubuntu0.1_amd64.deb ...
    Unpacking libgd3:amd64 (2.1.0-3ubuntu0.1) over (2.1.0-3) ...
    Preparing to unpack .../landscape-server_16.03.1-0ubuntu1_amd64.deb ...
    /etc/init.d/landscape-juju-sync: line 19: run: command not found
    invoke-rc.d: initscript landscape-juju-sync, action "stop" failed.
    dpkg: warning: subprocess old pre-removal script returned error exit status 127
    dpkg: trying script from the new package instead ...
    /etc/init.d/landscape-juju-sync: line 19: run: command not found
    invoke-rc.d: initscript landscape-juju-sync, action "stop" failed.
    dpkg: error processing archive /var/cache/apt/archives/landscape-server_16.03.1-0ubuntu1_amd64.deb (--unpack):
     subprocess new pre-removal script returned error exit status 127
    /etc/init.d/landscape-appserver: 24: /etc/init.d/landscape-appserver: run: not found
    invoke-rc.d: initscript landscape-appserver, action "start" failed.
    dpkg: error while cleaning up:
     subprocess installed post-installation script returned error exit status 127
    Preparing to unpack .../libapt-pkg4.12_1.0.1ubuntu2.14_amd64.deb ...
    Unpacking libapt-pkg4.12:amd64 (1.0.1ubuntu2.14) over (1.0.1ubuntu2.12) ...
    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    I get an error from sub-process?
    Sorry for the slow reply!

  • Hi @XenoWarrior,

    This looks like the upstream package is broken. You can try something like dpkg-reconfigure landscape-server, but if this doesn’t work, your best bet is to try and purge the package (apt-get purge landscape-server) and try again. I did see a number of items on the web about a postgres database being required and not properly being created, so we can try that next if these steps don’t fix the problem.

  • Show 1 more comments
2 Answers

Removed the “run” commands from the scripts which contained them and then there were no issues with removing the package.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!