Question

Problem with Landscape Server

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:

https://ss.projectge.com/?u=xenowarrior&f=609935154.txt

Thanks!

Subscribe
Share
After this operation, 38.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main linux-libc-dev amd64 3.13.0-88.135 [772 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libexpat1-dev amd64 2.1.0-4ubuntu1.3 [115 kB]
Get:3 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libexpat1 amd64 2.1.0-4ubuntu1.3 [71.1 kB]
Get:4 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.8 [573 kB]
Get:5 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main wget amd64 1.15-1ubuntu1.14.04.2 [271 kB]
Get:6 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main grub-pc amd64 2.02~beta2-9ubuntu1.8 [173 kB]
Get:7 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main grub-pc-bin amd64 2.02~beta2-9ubuntu1.8 [879 kB]
Get:8 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main grub2-common amd64 2.02~beta2-9ubuntu1.8 [501 kB]
Get:9 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main grub-common amd64 2.02~beta2-9ubuntu1.8 [1,682 kB]
Get:10 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main augeas-lenses all 1.2.0-0ubuntu1.2 [229 kB]
Get:11 http://mirrors.digitalocean.com/ubuntu/ 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:
 /var/cache/apt/archives/landscape-server_16.03.1-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@projectge:~#

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

Sorry I have actually fixed it since then, I went into the scripts which had errors and commented the “run” commands out and then removed Landscape, everything is running fine now. Thanks for the help!

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.

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

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

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


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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

This comment has been deleted