Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12894

Non Linux characters in /var/lib/dpkg/info/zabbix-frontend-php.postinst

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 3.2.9
    • Installation (I)
    • None
    • Ubuntu Xenial + MySQL

      When installing the Frontend I get this error:

      root@recon:~# apt-get install zabbix-frontend-php
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      The following NEW packages will be installed
      zabbix-frontend-php
      0 to upgrade, 1 to newly install, 0 to remove and 1 not to upgrade.
      Need to get 0 B/1,876 kB of archives.
      After this operation, 14.4 MB of additional disk space will be used.
      Selecting previously unselected package zabbix-frontend-php.
      (Reading database ... 326310 files and directories currently installed.)
      Preparing to unpack .../zabbix-frontend-php_1%3a3.2.9-1+xenial_all.deb ...
      Unpacking zabbix-frontend-php (1:3.2.9-1+xenial) ...
      Setting up zabbix-frontend-php (1:3.2.9-1+xenial) ...
      /var/lib/dpkg/info/zabbix-frontend-php.postinst: 11: /var/lib/dpkg/info/zabbix-frontend-php.postinst: Syntax error: "then" unexpected (expecting "done")
      dpkg: error processing package zabbix-frontend-php (--configure):
      subprocess installed post-installation script returned error exit status 2
      Errors were encountered while processing:
      zabbix-frontend-php
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      The problem is non Linux characters in /var/lib/dpkg/info/zabbix-frontend-php.postinst as follows:

      root@recon:~# cat -A /var/lib/dpkg/info/zabbix-frontend-php.postinst
      #!/bin/sh -e$
      $
      if [ "$1" = "configure" ]; then$
      $
      if [ -d /etc/zabbix/web ]; then$
      chown www-data.root /etc/zabbix/web$
      chmod 755 /etc/zabbix/web$
      fi$
      $
      for file in /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf; do$
      M-bM-@M-^BM-bM-@M-BM-bM-@M-BM-bM-@M-^B if [ -e $file ]; then$
      update-alternatives --install /usr/share/zabbix/fonts/graphfont.ttf zabbix-frontend-font $file 10$
      M-bM-@M-^BM-bM-@M-BM-bM-@M-BM-bM-@M-^B break$
      M-bM-@M-^BM-bM-@M-BM-bM-@M-BM-bM-@M-^B fi$
      done$
      $
      for file in /etc/alternatives/ttf-japanese-gothic.ttf /etc/alternatives/fonts-japanese-gothic.ttf; do$
      if [ -e $file ]; then$
      update-alternatives --install /usr/share/zabbix/fonts/graphfont.ttf zabbix-frontend-font $file 20$
      break$
      fi$
      done$
      $
      if [ -d /etc/apache2/conf.d ] && [ ! -f /etc/apache2/conf.d/zabbix ] && [ ! -h /etc/apache2/conf.d/zabbix ]; then$
      ln -s /etc/zabbix/apache.conf /etc/apache2/conf.d/zabbix$
      elif [ -d /etc/apache2/conf-available ] && [ ! -f /etc/apache2/conf-available/zabbix.conf ] && [ ! -h /etc/apache2/conf-available/zabbix.conf ]; then$
      ln -s /etc/zabbix/apache.conf /etc/apache2/conf-available/zabbix.conf$
      /usr/sbin/a2enconf zabbix.conf$
      fi$
      $
      fi$
      $

      1. dh_installdeb will replace this with shell code automatically$
      2. generated by other debhelper scripts.$
        $
        $
        $
        exit 0$

      If you remove the M-bM-@M-^BM-bM-@M-BM-bM-@M-BM-bM-@M-^B it all works.

            Unassigned Unassigned
            richard.scott Richard Scott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: