E: Sub-process /usr/bin/dpkg returned an error code (1) [Related to KVM]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I tried to install KVM on ubuntu 17.10 and got this error:



**anuragabhi@abhishek-Notebook:~$** sudo aptitude install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

[sudo] password for anuragabhi:
The following NEW packages will be installed:

ata augeas-lensesa bridge-utils dctrl-toolsa debootstrapa devscriptsa dmeventda dputa ebtablesa ipxe-qemua
kpartxa libaugeas0a libb-hooks-endofscope-perla libboost-random1.62.0a libboost-regex1.62.0a libcacard0a
libclass-method-modifiers-perla libclass-xsaccessor-perla libdata-optlist-perla libdevel-globaldestruction-perla
libdevmapper-event1.02.1a libdistro-info-perla libfdt1a libfile-chdir-perla libfile-homedir-perla libfile-which-perla
libgetopt-long-descriptive-perla libgit-wrapper-perla libibverbs1a libimport-into-perla libio-stringy-perla libiscsi7a
liblist-compare-perla liblvm2app2.2a liblvm2cmd2.02a libmodule-implementation-perla libmodule-runtime-perla
libmoo-perla libnamespace-clean-perla libnetcf1a libnumber-compare-perla libnumber-range-perla libpackage-stash-perla
libpackage-stash-xs-perla libparams-classify-perla libparams-util-perla libparams-validate-perla
libpath-iterator-rule-perla libpath-tiny-perla libpod-constants-perla librados2a librbd1a libreadline5a
librole-tiny-perla libsort-key-perla libsort-versions-perla libspice-server1a libstrictures-perla
libstring-copyright-perla libstring-escape-perla libsub-exporter-perla libsub-exporter-progressive-perla
libsub-identify-perla libsub-install-perla libsub-quote-perla libtext-glob-perla libtry-tiny-perla
libunicode-utf8-perla libusbredirparser1a libvariable-magic-perla libvirt-bin libvirt-clientsa libvirt-daemona
libvirt-daemon-systema libvirt0a libxen-4.9a libxenstore3.0a libxml2-utilsa licensechecka lvm2a python-cheetaha
python-libvirta python-vm-buildera python3-magica python3-unidiffa qemu-block-extraa qemu-kvm qemu-system-commona
qemu-system-x86a qemu-utilsa seabiosa sharutilsa ubuntu-vm-builder wdiffa

The following partially installed packages will be configured:
install-info
0 packages upgraded, 94 newly installed, 0 to remove and 49 not upgraded.
Need to get 0 B/21.4 MB of archives. After unpacking 91.9 MB will be used.
Do you want to continue? [Y/n/?] y
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up install-info (6.4.90.dfsg.1-1build1) ...
/usr/sbin/update-info-dir: 3: /etc/environment: $: not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up install-info (6.4.90.dfsg.1-1build1) ...
/usr/sbin/update-info-dir: 3: /etc/environment: $: not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
install-info


To solve DPKG error, I tried the solution given in the link:



E: Sub-process /usr/bin/dpkg returned an error code (1) [related to google chrome]



But nothing seems to work.



I tried some commands, and the output is as follows:



anuragabhi@abhishek-Notebook:~$ cat /usr/sbin/update-info-dir
#!/bin/sh
# update-info-dir
# create a dir file from all installed info files
# Copyright 2009, 2014 Norbert Preining
# GPLv2

unset LANGUAGE
unset LANG
if [ -r /etc/environment ] ; then
. /etc/environment
fi
if [ -r /etc/default/locale ] ; then
. /etc/default/locale
fi

Help ()

echo "
SYNOPSIS: update-info-dir [-h,--help] [info-directory]

(re-)creates the index of available documentation in info format
(the file /usr/share/info/dir) which is usually presented by info
browsers
on startup."

exit 0



if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
Help
fi

if [ -n "$1" ] ; then
INFODIR="$1"
fi

if [ ! -d "$INFODIR" ] ; then
echo "Not a directory: $INFODIR." >&2
exit 1
fi

if [ -r "$INFODIR/dir" ] ; then
rm -f "$INFODIR/dir.old"
cp $INFODIR/dir $INFODIR/dir.old
fi

# we have to remove the dir file not make install-info being surprised
rm -f "$INFODIR/dir"

errors=0
find "$INFODIR" -type f | while read file ; do
case $file in
*/dir|*/dir.gz|*/dir.old|*/dir.old.gz|*-[0-9]|*-[0-9].gz|*-[1-9]
[0-9]|*-[1-9][0-9].gz|*.png|*.jpg)
# these files are ignored
continue
;;
*)
install-info "$file" "$INFODIR/dir" ||
errors=$((errors+1))

;;
esac
done

if [ $errors -gt 0 ] ; then
exec >&2
echo
echo "Updating the index of info documentation produced $errors
errors."
fi

exit 0

# vim:set expandtab tabstop=2: #


and:



anuragabhi@abhishek-Notebook:~$ cat /etc/environment

PATH="
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/g a
mes:/usr/local/games"


$ cat >> etc/environment <<EOL
JAVA_HOME=/usr/bin/lib/jvm/java-8-oracle
JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
EOL









share|improve this question

























    up vote
    1
    down vote

    favorite












    I tried to install KVM on ubuntu 17.10 and got this error:



    **anuragabhi@abhishek-Notebook:~$** sudo aptitude install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

    [sudo] password for anuragabhi:
    The following NEW packages will be installed:

    ata augeas-lensesa bridge-utils dctrl-toolsa debootstrapa devscriptsa dmeventda dputa ebtablesa ipxe-qemua
    kpartxa libaugeas0a libb-hooks-endofscope-perla libboost-random1.62.0a libboost-regex1.62.0a libcacard0a
    libclass-method-modifiers-perla libclass-xsaccessor-perla libdata-optlist-perla libdevel-globaldestruction-perla
    libdevmapper-event1.02.1a libdistro-info-perla libfdt1a libfile-chdir-perla libfile-homedir-perla libfile-which-perla
    libgetopt-long-descriptive-perla libgit-wrapper-perla libibverbs1a libimport-into-perla libio-stringy-perla libiscsi7a
    liblist-compare-perla liblvm2app2.2a liblvm2cmd2.02a libmodule-implementation-perla libmodule-runtime-perla
    libmoo-perla libnamespace-clean-perla libnetcf1a libnumber-compare-perla libnumber-range-perla libpackage-stash-perla
    libpackage-stash-xs-perla libparams-classify-perla libparams-util-perla libparams-validate-perla
    libpath-iterator-rule-perla libpath-tiny-perla libpod-constants-perla librados2a librbd1a libreadline5a
    librole-tiny-perla libsort-key-perla libsort-versions-perla libspice-server1a libstrictures-perla
    libstring-copyright-perla libstring-escape-perla libsub-exporter-perla libsub-exporter-progressive-perla
    libsub-identify-perla libsub-install-perla libsub-quote-perla libtext-glob-perla libtry-tiny-perla
    libunicode-utf8-perla libusbredirparser1a libvariable-magic-perla libvirt-bin libvirt-clientsa libvirt-daemona
    libvirt-daemon-systema libvirt0a libxen-4.9a libxenstore3.0a libxml2-utilsa licensechecka lvm2a python-cheetaha
    python-libvirta python-vm-buildera python3-magica python3-unidiffa qemu-block-extraa qemu-kvm qemu-system-commona
    qemu-system-x86a qemu-utilsa seabiosa sharutilsa ubuntu-vm-builder wdiffa

    The following partially installed packages will be configured:
    install-info
    0 packages upgraded, 94 newly installed, 0 to remove and 49 not upgraded.
    Need to get 0 B/21.4 MB of archives. After unpacking 91.9 MB will be used.
    Do you want to continue? [Y/n/?] y
    Extracting templates from packages: 100%
    Preconfiguring packages ...
    Setting up install-info (6.4.90.dfsg.1-1build1) ...
    /usr/sbin/update-info-dir: 3: /etc/environment: $: not found
    dpkg: error processing package install-info (--configure):
    subprocess installed post-installation script returned error exit status 127
    Errors were encountered while processing:
    install-info
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Setting up install-info (6.4.90.dfsg.1-1build1) ...
    /usr/sbin/update-info-dir: 3: /etc/environment: $: not found
    dpkg: error processing package install-info (--configure):
    subprocess installed post-installation script returned error exit status 127
    Errors were encountered while processing:
    install-info


    To solve DPKG error, I tried the solution given in the link:



    E: Sub-process /usr/bin/dpkg returned an error code (1) [related to google chrome]



    But nothing seems to work.



    I tried some commands, and the output is as follows:



    anuragabhi@abhishek-Notebook:~$ cat /usr/sbin/update-info-dir
    #!/bin/sh
    # update-info-dir
    # create a dir file from all installed info files
    # Copyright 2009, 2014 Norbert Preining
    # GPLv2

    unset LANGUAGE
    unset LANG
    if [ -r /etc/environment ] ; then
    . /etc/environment
    fi
    if [ -r /etc/default/locale ] ; then
    . /etc/default/locale
    fi

    Help ()

    echo "
    SYNOPSIS: update-info-dir [-h,--help] [info-directory]

    (re-)creates the index of available documentation in info format
    (the file /usr/share/info/dir) which is usually presented by info
    browsers
    on startup."

    exit 0



    if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    Help
    fi

    if [ -n "$1" ] ; then
    INFODIR="$1"
    fi

    if [ ! -d "$INFODIR" ] ; then
    echo "Not a directory: $INFODIR." >&2
    exit 1
    fi

    if [ -r "$INFODIR/dir" ] ; then
    rm -f "$INFODIR/dir.old"
    cp $INFODIR/dir $INFODIR/dir.old
    fi

    # we have to remove the dir file not make install-info being surprised
    rm -f "$INFODIR/dir"

    errors=0
    find "$INFODIR" -type f | while read file ; do
    case $file in
    */dir|*/dir.gz|*/dir.old|*/dir.old.gz|*-[0-9]|*-[0-9].gz|*-[1-9]
    [0-9]|*-[1-9][0-9].gz|*.png|*.jpg)
    # these files are ignored
    continue
    ;;
    *)
    install-info "$file" "$INFODIR/dir" ||
    errors=$((errors+1))

    ;;
    esac
    done

    if [ $errors -gt 0 ] ; then
    exec >&2
    echo
    echo "Updating the index of info documentation produced $errors
    errors."
    fi

    exit 0

    # vim:set expandtab tabstop=2: #


    and:



    anuragabhi@abhishek-Notebook:~$ cat /etc/environment

    PATH="
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/g a
    mes:/usr/local/games"


    $ cat >> etc/environment <<EOL
    JAVA_HOME=/usr/bin/lib/jvm/java-8-oracle
    JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
    EOL









    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I tried to install KVM on ubuntu 17.10 and got this error:



      **anuragabhi@abhishek-Notebook:~$** sudo aptitude install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

      [sudo] password for anuragabhi:
      The following NEW packages will be installed:

      ata augeas-lensesa bridge-utils dctrl-toolsa debootstrapa devscriptsa dmeventda dputa ebtablesa ipxe-qemua
      kpartxa libaugeas0a libb-hooks-endofscope-perla libboost-random1.62.0a libboost-regex1.62.0a libcacard0a
      libclass-method-modifiers-perla libclass-xsaccessor-perla libdata-optlist-perla libdevel-globaldestruction-perla
      libdevmapper-event1.02.1a libdistro-info-perla libfdt1a libfile-chdir-perla libfile-homedir-perla libfile-which-perla
      libgetopt-long-descriptive-perla libgit-wrapper-perla libibverbs1a libimport-into-perla libio-stringy-perla libiscsi7a
      liblist-compare-perla liblvm2app2.2a liblvm2cmd2.02a libmodule-implementation-perla libmodule-runtime-perla
      libmoo-perla libnamespace-clean-perla libnetcf1a libnumber-compare-perla libnumber-range-perla libpackage-stash-perla
      libpackage-stash-xs-perla libparams-classify-perla libparams-util-perla libparams-validate-perla
      libpath-iterator-rule-perla libpath-tiny-perla libpod-constants-perla librados2a librbd1a libreadline5a
      librole-tiny-perla libsort-key-perla libsort-versions-perla libspice-server1a libstrictures-perla
      libstring-copyright-perla libstring-escape-perla libsub-exporter-perla libsub-exporter-progressive-perla
      libsub-identify-perla libsub-install-perla libsub-quote-perla libtext-glob-perla libtry-tiny-perla
      libunicode-utf8-perla libusbredirparser1a libvariable-magic-perla libvirt-bin libvirt-clientsa libvirt-daemona
      libvirt-daemon-systema libvirt0a libxen-4.9a libxenstore3.0a libxml2-utilsa licensechecka lvm2a python-cheetaha
      python-libvirta python-vm-buildera python3-magica python3-unidiffa qemu-block-extraa qemu-kvm qemu-system-commona
      qemu-system-x86a qemu-utilsa seabiosa sharutilsa ubuntu-vm-builder wdiffa

      The following partially installed packages will be configured:
      install-info
      0 packages upgraded, 94 newly installed, 0 to remove and 49 not upgraded.
      Need to get 0 B/21.4 MB of archives. After unpacking 91.9 MB will be used.
      Do you want to continue? [Y/n/?] y
      Extracting templates from packages: 100%
      Preconfiguring packages ...
      Setting up install-info (6.4.90.dfsg.1-1build1) ...
      /usr/sbin/update-info-dir: 3: /etc/environment: $: not found
      dpkg: error processing package install-info (--configure):
      subprocess installed post-installation script returned error exit status 127
      Errors were encountered while processing:
      install-info
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      Setting up install-info (6.4.90.dfsg.1-1build1) ...
      /usr/sbin/update-info-dir: 3: /etc/environment: $: not found
      dpkg: error processing package install-info (--configure):
      subprocess installed post-installation script returned error exit status 127
      Errors were encountered while processing:
      install-info


      To solve DPKG error, I tried the solution given in the link:



      E: Sub-process /usr/bin/dpkg returned an error code (1) [related to google chrome]



      But nothing seems to work.



      I tried some commands, and the output is as follows:



      anuragabhi@abhishek-Notebook:~$ cat /usr/sbin/update-info-dir
      #!/bin/sh
      # update-info-dir
      # create a dir file from all installed info files
      # Copyright 2009, 2014 Norbert Preining
      # GPLv2

      unset LANGUAGE
      unset LANG
      if [ -r /etc/environment ] ; then
      . /etc/environment
      fi
      if [ -r /etc/default/locale ] ; then
      . /etc/default/locale
      fi

      Help ()

      echo "
      SYNOPSIS: update-info-dir [-h,--help] [info-directory]

      (re-)creates the index of available documentation in info format
      (the file /usr/share/info/dir) which is usually presented by info
      browsers
      on startup."

      exit 0



      if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
      Help
      fi

      if [ -n "$1" ] ; then
      INFODIR="$1"
      fi

      if [ ! -d "$INFODIR" ] ; then
      echo "Not a directory: $INFODIR." >&2
      exit 1
      fi

      if [ -r "$INFODIR/dir" ] ; then
      rm -f "$INFODIR/dir.old"
      cp $INFODIR/dir $INFODIR/dir.old
      fi

      # we have to remove the dir file not make install-info being surprised
      rm -f "$INFODIR/dir"

      errors=0
      find "$INFODIR" -type f | while read file ; do
      case $file in
      */dir|*/dir.gz|*/dir.old|*/dir.old.gz|*-[0-9]|*-[0-9].gz|*-[1-9]
      [0-9]|*-[1-9][0-9].gz|*.png|*.jpg)
      # these files are ignored
      continue
      ;;
      *)
      install-info "$file" "$INFODIR/dir" ||
      errors=$((errors+1))

      ;;
      esac
      done

      if [ $errors -gt 0 ] ; then
      exec >&2
      echo
      echo "Updating the index of info documentation produced $errors
      errors."
      fi

      exit 0

      # vim:set expandtab tabstop=2: #


      and:



      anuragabhi@abhishek-Notebook:~$ cat /etc/environment

      PATH="
      /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/g a
      mes:/usr/local/games"


      $ cat >> etc/environment <<EOL
      JAVA_HOME=/usr/bin/lib/jvm/java-8-oracle
      JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
      EOL









      share|improve this question













      I tried to install KVM on ubuntu 17.10 and got this error:



      **anuragabhi@abhishek-Notebook:~$** sudo aptitude install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

      [sudo] password for anuragabhi:
      The following NEW packages will be installed:

      ata augeas-lensesa bridge-utils dctrl-toolsa debootstrapa devscriptsa dmeventda dputa ebtablesa ipxe-qemua
      kpartxa libaugeas0a libb-hooks-endofscope-perla libboost-random1.62.0a libboost-regex1.62.0a libcacard0a
      libclass-method-modifiers-perla libclass-xsaccessor-perla libdata-optlist-perla libdevel-globaldestruction-perla
      libdevmapper-event1.02.1a libdistro-info-perla libfdt1a libfile-chdir-perla libfile-homedir-perla libfile-which-perla
      libgetopt-long-descriptive-perla libgit-wrapper-perla libibverbs1a libimport-into-perla libio-stringy-perla libiscsi7a
      liblist-compare-perla liblvm2app2.2a liblvm2cmd2.02a libmodule-implementation-perla libmodule-runtime-perla
      libmoo-perla libnamespace-clean-perla libnetcf1a libnumber-compare-perla libnumber-range-perla libpackage-stash-perla
      libpackage-stash-xs-perla libparams-classify-perla libparams-util-perla libparams-validate-perla
      libpath-iterator-rule-perla libpath-tiny-perla libpod-constants-perla librados2a librbd1a libreadline5a
      librole-tiny-perla libsort-key-perla libsort-versions-perla libspice-server1a libstrictures-perla
      libstring-copyright-perla libstring-escape-perla libsub-exporter-perla libsub-exporter-progressive-perla
      libsub-identify-perla libsub-install-perla libsub-quote-perla libtext-glob-perla libtry-tiny-perla
      libunicode-utf8-perla libusbredirparser1a libvariable-magic-perla libvirt-bin libvirt-clientsa libvirt-daemona
      libvirt-daemon-systema libvirt0a libxen-4.9a libxenstore3.0a libxml2-utilsa licensechecka lvm2a python-cheetaha
      python-libvirta python-vm-buildera python3-magica python3-unidiffa qemu-block-extraa qemu-kvm qemu-system-commona
      qemu-system-x86a qemu-utilsa seabiosa sharutilsa ubuntu-vm-builder wdiffa

      The following partially installed packages will be configured:
      install-info
      0 packages upgraded, 94 newly installed, 0 to remove and 49 not upgraded.
      Need to get 0 B/21.4 MB of archives. After unpacking 91.9 MB will be used.
      Do you want to continue? [Y/n/?] y
      Extracting templates from packages: 100%
      Preconfiguring packages ...
      Setting up install-info (6.4.90.dfsg.1-1build1) ...
      /usr/sbin/update-info-dir: 3: /etc/environment: $: not found
      dpkg: error processing package install-info (--configure):
      subprocess installed post-installation script returned error exit status 127
      Errors were encountered while processing:
      install-info
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      Setting up install-info (6.4.90.dfsg.1-1build1) ...
      /usr/sbin/update-info-dir: 3: /etc/environment: $: not found
      dpkg: error processing package install-info (--configure):
      subprocess installed post-installation script returned error exit status 127
      Errors were encountered while processing:
      install-info


      To solve DPKG error, I tried the solution given in the link:



      E: Sub-process /usr/bin/dpkg returned an error code (1) [related to google chrome]



      But nothing seems to work.



      I tried some commands, and the output is as follows:



      anuragabhi@abhishek-Notebook:~$ cat /usr/sbin/update-info-dir
      #!/bin/sh
      # update-info-dir
      # create a dir file from all installed info files
      # Copyright 2009, 2014 Norbert Preining
      # GPLv2

      unset LANGUAGE
      unset LANG
      if [ -r /etc/environment ] ; then
      . /etc/environment
      fi
      if [ -r /etc/default/locale ] ; then
      . /etc/default/locale
      fi

      Help ()

      echo "
      SYNOPSIS: update-info-dir [-h,--help] [info-directory]

      (re-)creates the index of available documentation in info format
      (the file /usr/share/info/dir) which is usually presented by info
      browsers
      on startup."

      exit 0



      if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
      Help
      fi

      if [ -n "$1" ] ; then
      INFODIR="$1"
      fi

      if [ ! -d "$INFODIR" ] ; then
      echo "Not a directory: $INFODIR." >&2
      exit 1
      fi

      if [ -r "$INFODIR/dir" ] ; then
      rm -f "$INFODIR/dir.old"
      cp $INFODIR/dir $INFODIR/dir.old
      fi

      # we have to remove the dir file not make install-info being surprised
      rm -f "$INFODIR/dir"

      errors=0
      find "$INFODIR" -type f | while read file ; do
      case $file in
      */dir|*/dir.gz|*/dir.old|*/dir.old.gz|*-[0-9]|*-[0-9].gz|*-[1-9]
      [0-9]|*-[1-9][0-9].gz|*.png|*.jpg)
      # these files are ignored
      continue
      ;;
      *)
      install-info "$file" "$INFODIR/dir" ||
      errors=$((errors+1))

      ;;
      esac
      done

      if [ $errors -gt 0 ] ; then
      exec >&2
      echo
      echo "Updating the index of info documentation produced $errors
      errors."
      fi

      exit 0

      # vim:set expandtab tabstop=2: #


      and:



      anuragabhi@abhishek-Notebook:~$ cat /etc/environment

      PATH="
      /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/g a
      mes:/usr/local/games"


      $ cat >> etc/environment <<EOL
      JAVA_HOME=/usr/bin/lib/jvm/java-8-oracle
      JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
      EOL






      apt package-management dpkg virtualization kvm






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 4 at 16:43









      Anurag

      61




      61




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          The first error message tells the tale: /usr/sbin/update-info-dir: 3: /etc/environment: $: not found. As you can see, the update-info-dir script only uses /etc/environment as a parameter to . it (. is also the bash command source), to set some parameters in the environment of the current process.



          On my Ubuntu 16.04.4 system (YMMV), it contains the initial setting of PATH, a Very Important Variable. PATH is the colon-separated list of directories along which bash searches for executables.



          You can fix your problem:



          /usr/bin/sudo /bin/rm /etc/environment
          echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | /usr/bin/sudo /usr/bin/tee /etc/environment'
          /bin/chmod 0644 /etc/environment





          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1011834%2fe-sub-process-usr-bin-dpkg-returned-an-error-code-1-related-to-kvm%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            The first error message tells the tale: /usr/sbin/update-info-dir: 3: /etc/environment: $: not found. As you can see, the update-info-dir script only uses /etc/environment as a parameter to . it (. is also the bash command source), to set some parameters in the environment of the current process.



            On my Ubuntu 16.04.4 system (YMMV), it contains the initial setting of PATH, a Very Important Variable. PATH is the colon-separated list of directories along which bash searches for executables.



            You can fix your problem:



            /usr/bin/sudo /bin/rm /etc/environment
            echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | /usr/bin/sudo /usr/bin/tee /etc/environment'
            /bin/chmod 0644 /etc/environment





            share|improve this answer
























              up vote
              1
              down vote













              The first error message tells the tale: /usr/sbin/update-info-dir: 3: /etc/environment: $: not found. As you can see, the update-info-dir script only uses /etc/environment as a parameter to . it (. is also the bash command source), to set some parameters in the environment of the current process.



              On my Ubuntu 16.04.4 system (YMMV), it contains the initial setting of PATH, a Very Important Variable. PATH is the colon-separated list of directories along which bash searches for executables.



              You can fix your problem:



              /usr/bin/sudo /bin/rm /etc/environment
              echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | /usr/bin/sudo /usr/bin/tee /etc/environment'
              /bin/chmod 0644 /etc/environment





              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                The first error message tells the tale: /usr/sbin/update-info-dir: 3: /etc/environment: $: not found. As you can see, the update-info-dir script only uses /etc/environment as a parameter to . it (. is also the bash command source), to set some parameters in the environment of the current process.



                On my Ubuntu 16.04.4 system (YMMV), it contains the initial setting of PATH, a Very Important Variable. PATH is the colon-separated list of directories along which bash searches for executables.



                You can fix your problem:



                /usr/bin/sudo /bin/rm /etc/environment
                echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | /usr/bin/sudo /usr/bin/tee /etc/environment'
                /bin/chmod 0644 /etc/environment





                share|improve this answer












                The first error message tells the tale: /usr/sbin/update-info-dir: 3: /etc/environment: $: not found. As you can see, the update-info-dir script only uses /etc/environment as a parameter to . it (. is also the bash command source), to set some parameters in the environment of the current process.



                On my Ubuntu 16.04.4 system (YMMV), it contains the initial setting of PATH, a Very Important Variable. PATH is the colon-separated list of directories along which bash searches for executables.



                You can fix your problem:



                /usr/bin/sudo /bin/rm /etc/environment
                echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | /usr/bin/sudo /usr/bin/tee /etc/environment'
                /bin/chmod 0644 /etc/environment






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 4 at 17:44









                waltinator

                20.7k74068




                20.7k74068



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1011834%2fe-sub-process-usr-bin-dpkg-returned-an-error-code-1-related-to-kvm%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Which professions warranted travel in Medieval times?

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    Trouble downloading packages list due to a “Hash sum mismatch” error