2

I am trying to install driver for my printer but this happened..

 $ sudo dpkg -i openprinting-gutenprint_5.2.7-1lsb3.2_amd64.deb 
    (Reading database ... 204753 files and directories currently installed.)
    Preparing to unpack openprinting-gutenprint_5.2.7-1lsb3.2_amd64.deb ...
    Unpacking openprinting-gutenprint (5.2.7-1lsb3.2) ...
    dpkg: dependency problems prevent configuration of openprinting-gutenprint:
     openprinting-gutenprint depends on lsb (>= 3.2); however:
      Package lsb is not installed.

dpkg: error processing package openprinting-gutenprint (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openprinting-gutenprint

After that I tried installing lsb..

$ sudo apt-get install lsb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 lsb : Depends: lsb-core (>= 9.20170808ubuntu1)
       Depends: lsb-printing (>= 9.20170808ubuntu1) but it is not going to be installed
       Depends: libjpeg62 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Finally I tried installing lsb-core, but..

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  java-wrappers
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  alien at autoconf automake autopoint autotools-dev debhelper debugedit dh-autoreconf
  dh-strip-nondeterminism libarchive-cpio-perl libfile-stripnondeterminism-perl libgsasl7
  libjpeg62 libkyotocabinet16v5 libltdl-dev libmail-sendmail-perl libmailutils5
  libmysqlclient20 libntlm0 librpm8 librpmbuild8 librpmio8 librpmsign8 libsigsegv2
  libsys-hostname-long-perl libtool lsb lsb-core lsb-invalid-mta lsb-printing lsb-security m4
  mailutils mailutils-common mysql-common ncurses-term pax po-debconf rpm rpm-common rpm2cpio
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc dh-make dwz rpm-i18n libtool-doc gfortran
  | fortran95-compiler gcj-jdk m4-doc mailutils-mh mailutils-doc libmail-box-perl elfutils
  rpmlint rpm2html
The following NEW packages will be installed:
  alien at autoconf automake autopoint autotools-dev debhelper debugedit dh-autoreconf
  dh-strip-nondeterminism libarchive-cpio-perl libfile-stripnondeterminism-perl libgsasl7
  libjpeg62 libkyotocabinet16v5 libltdl-dev libmail-sendmail-perl libmailutils5
  libmysqlclient20 libntlm0 librpm8 librpmbuild8 librpmio8 librpmsign8 libsigsegv2
  libsys-hostname-long-perl libtool lsb lsb-core lsb-invalid-mta lsb-printing lsb-security m4
  mailutils mailutils-common mysql-common ncurses-term pax po-debconf rpm rpm-common rpm2cpio
0 upgraded, 42 newly installed, 0 to remove and 8 not upgraded.
2 not fully installed or removed.
Need to get 0 B/6,208 kB of archives.
After this operation, 27.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Setting up install-info (6.5.0.dfsg.1-2) ...
/usr/sbin/update-info-dir: 2: /etc/environment: k9d0^1: not found
dpkg: error processing package install-info (--configure):
 installed install-info package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)

The following are in my /etc/environment file:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/bin/"
  • Yes. Its somewhat like that. What should I do? – Dipesh J Pandey Oct 13 '18 at 4:27
  • Yes it does exist. I've found a solution in here: ubuntuforums.org/showthread.php?t=1617100. Thank you for trying to help. – Dipesh J Pandey Oct 13 '18 at 4:39
  • Nice! Feel free to answer your own question here about that and giving credit to that site that you found your answer on. It will help others if they experience the same thing. I've found similar questions here, but they were not exactly the same as yours so the solutions were different. =) – Terrance Oct 13 '18 at 4:42
  • You have some garbage in /etc/environment. See message /usr/sbin/update-info-dir: 2: /etc/environment: k9d0^1: not found above. Check it. – N0rbert Oct 13 '18 at 7:36
0

As sugested in a thread linked in the comments above, run:

sudo mv /var/lib/dpkg/info/install-info.postinst /var/lib/dpkg/info/install-info.postinst.bad

If it doesn't solve your problem, revert it by

sudo mv /var/lib/dpkg/info/install-info.postinst.bad /var/lib/dpkg/info/install-info.postinst
0

Just ran

sudo apt --fix-broken install

and worked

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.