Removing the apache and php packages........................Failed



  • Hi, I am new to fog, and keep getting this error.

    Server
    Fog version 1.4.4
    OS: Ubuntu 16.04 LTS ( Fresh install ) all OS updates

    Installation message.

    +------------------------------------------+
       |     ..#######:.    ..,#,..     .::##::.  |
       |.:######          .:;####:......;#;..     |
       |...##...        ...##;,;##::::.##...      |
       |   ,#          ...##.....##:::##     ..:: |
       |   ##    .::###,,##.   . ##.::#.:######::.|
       |...##:::###::....#. ..  .#...#. #...#:::. |
       |..:####:..    ..##......##::##  ..  #     |
       |    #  .      ...##:,;##;:::#: ... ##..   |
       |   .#  .       .:;####;::::.##:::;#:..    |
       |    #                     ..:;###..       |
       |                                          |
       +------------------------------------------+
       |      Free Computer Imaging Solution      |
       +------------------------------------------+
       |  Credits: http://fogproject.org/Credits  |
       |       http://fogproject.org/Credits      |
       |       Released under GPL Version 3       |
       +------------------------------------------+
    
    
       Version: 1.4.4 Installer/Updater
    
      What version of Linux would you like to run the installation for?
    
              1) Redhat Based Linux (Redhat, CentOS, Mageia)
              2) Debian Based Linux (Debian, Ubuntu, Kubuntu, Edubuntu)
              3) Arch Linux
    
      Choice: [2] 2
    
    
    
      Starting Debian based Installation
    
    
     *** Detected a potential need to reinstall apache and php files.
     *** This will remove the /etc/php* and /etc/apache2* directories
     ***  and remove/purge the apache and php files from this system.
     *** If you're okay with this please type Y, anything else will
     ***  continue the installation, but may mean you will need to
     ***  remove the files later and make proper changes as 
     ***  necessary. (Y/N): 
    y
     * Removing apache and php files...............................Done
     * Stopping web services.......................................Done
     * Removing the apache and php packages........................Failed
     * Resetting our variables to specify php version 7.1..........Done
      FOG Server installation modes:
          * Normal Server: (Choice N) 
              This is the typical installation type and
              will install all FOG components for you on this
              machine.  Pick this option if you are unsure what to pick.
    
          * Storage Node: (Choice S)
              This install mode will only install the software required
              to make this server act as a node in a storage group
    
      More information:  
         http://www.fogproject.org/wiki/index.php?title=InstallationModes
    
      What type of installation would you like to do? [N/s (Normal/Storage)] n
    
      What is the IP address to be used by this FOG Server? [10.47.0.27]
    
      Would you like to change the default network interface from enp1s0?
      If you are not sure, select No. [y/N] n
    
      Would you like to setup a router address for the DHCP server? [Y/n] y
      What is the IP address to be used for the router on
          the DHCP server? [10.47.0.5]
    
      Would you like DHCP to handle DNS? [Y/n] y
      What DNS address should DHCP allow? [127.0.1.1] 10.47.0.8
    
      Would you like to use the FOG server for DHCP service? [y/N] n
    
      This version of FOG has internationalization support, would  
      you like to install the additional language packs? [y/N] n
    
       ######################################################################
       #     FOG now has everything it needs for this setup, but please     #
       #   understand that this script will overwrite any setting you may   #
       #   have setup for services like DHCP, apache, pxe, tftp, and NFS.   #
       ######################################################################
       # It is not recommended that you install this on a production system #
       #        as this script modifies many of your system settings.       #
       ######################################################################
       #             This script should be run by the root user.            #
       #      It will prepend the running with sudo if root is not set      #
       ######################################################################
       #           ** Notice ** FOG is difficult to setup securely          #
       #        SELinux and IPTables are usually asked to be disabled       #
       #           There have been strides in adding capabilities           #
       #          The recommendations would now be more appropriate         #
       #    to set SELinux to permissive and to disable firewall for now.   #
       #  You can find some methods to enable SELinux and maintain firewall #
       #   settings and ports. If you feel comfortable doing so please do   #
       ######################################################################
       #            Please see our wiki for more information at:            #
       ######################################################################
       #             https://wiki.fogproject.org/wiki/index.php             #
       ######################################################################
    
     * Here are the settings FOG will use:
     * Base Linux: Debian
     * Detected Linux Distribution: Ubuntu
     * Server IP Address: 10.47.0.27
     * Server Subnet Mask: 255.255.255.0
     * Interface: enp1s0
     * Installation Type: Normal Server
     * Internationalization: 0
     * Image Storage Location: /images
     * Using FOG DHCP: No
     * DHCP will NOT be setup but you must setup your
     | current DHCP server to use FOG for PXE services.
    
     * On a Linux DHCP server you must set: next-server and filename
    
     * On a Windows DHCP server you must set options 066 and 067
    
     * Option 066/next-server is the IP of the FOG Server: (e.g. 10.47.0.27)
     * Option 067/filename is the bootfile: (e.g. undionly.kpxe)
    
    
     * Are you sure you wish to continue (Y/N) y
    
     * Installation Started
    
     * Installing required packages, if this fails
     | make sure you have an active internet connection.
    
     * Adding needed repository....................................OK
     * Preparing Package Manager...................................OK
     * Packages to be installed:
    
    	apache2 bc build-essential cpp curl g++ gawk gcc gzip htmldoc lftp libapache2-mod-php7.1 libc6 libcurl3 m4 mysql-client mysql-server net-tools nfs-kernel-server openssh-server php7.1 php7.1-bcmath php7.1-cli php7.1-curl php7.1-fpm php7.1-gd php7.1-json php7.1-ldap php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-mysqlnd php-gettext sysv-rc-conf tar tftpd-hpa tftp-hpa unzip vsftpd wget xinetd zlib1g 
    
    
     * Installing package: apache2.................................Failed! (Will try later)
     * Skipping package:   bc......................................(Already Installed)
     * Skipping package:   build-essential.........................(Already Installed)
     * Skipping package:   cpp.....................................(Already Installed)
     * Skipping package:   curl....................................(Already Installed)
     * Skipping package:   g++.....................................(Already Installed)
     * Skipping package:   gawk....................................(Already Installed)
     * Skipping package:   gcc.....................................(Already Installed)
     * Skipping package:   gzip....................................(Already Installed)
     * Skipping package:   htmldoc.................................(Already Installed)
     * Skipping package:   lftp....................................(Already Installed)
     * Installing package: libapache2-mod-php7.1...................Failed! (Will try later)
     * Skipping package:   libc6...................................(Already Installed)
     * Skipping package:   libcurl3................................(Already Installed)
     * Skipping package:   m4......................................(Already Installed)
     * Skipping package:   mysql-client............................(Already Installed)
     * Skipping package:   mysql-server............................(Already Installed)
     * Skipping package:   net-tools...............................(Already Installed)
     * Skipping package:   nfs-kernel-server.......................(Already Installed)
     * Skipping package:   openssh-server..........................(Already Installed)
     * Installing package: php7.1..................................Failed! (Will try later)
     * Installing package: php7.1-bcmath...........................Failed! (Will try later)
     * Skipping package:   php7.1-cli..............................(Already Installed)
     * Installing package: php7.1-curl.............................Failed! (Will try later)
     * Installing package: php7.1-fpm..............................Failed! (Will try later)
     * Installing package: php7.1-gd...............................Failed! (Will try later)
     * Skipping package:   php7.1-json.............................(Already Installed)
     * Installing package: php7.1-ldap.............................Failed! (Will try later)
     * Installing package: php7.1-mbstring.........................Failed! (Will try later)
     * Installing package: php7.1-mcrypt...........................Failed! (Will try later)
     * Installing package: php7.1-mysql............................Failed! (Will try later)
     * Skipping package:   php7.1-mysql............................(Already Installed)
     * Installing package: php-gettext.............................Failed! (Will try later)
     * Skipping package:   sysv-rc-conf............................(Already Installed)
     * Skipping package:   tar.....................................(Already Installed)
     * Skipping package:   tftpd-hpa...............................(Already Installed)
     * Skipping package:   tftp-hpa................................(Already Installed)
     * Skipping package:   unzip...................................(Already Installed)
     * Skipping package:   vsftpd..................................(Already Installed)
     * Skipping package:   wget....................................(Already Installed)
     * Skipping package:   xinetd..................................(Already Installed)
     * Skipping package:   zlib1g..................................(Already Installed)
     * Updating packages as needed.................................OK
     * Installing now everything is updated........................Failed!
    


  • @wayne-workman Like i said, i remove all damaged files manually, where the base command was sudo apt-get remove xxxxx Also I may use sudo apt-get xxxx and sudo apt-get upgrade xxxx Sorry if i don´t detail my fix steps very well, my english isn’t good :(


  • Moderator

    I find that answer difficult to believe - looking at the log in the first post, there were lots more failures than apache.



  • @tom-elliott Yah, Thx for the attention. Now step two Configuring Fog for the first time for my local network scenario. I will open new topic for that tho.


  • Senior Developer

    So just to clarify,

    You ran:

    sudo apt-get remove apache2
    

    Then everything worked?



  • @tom-elliott sure! i´ts on my 3rd message already, sorry i forgot to Code the text.


  • Senior Developer

    @thiagotw Please explain what method you chose so others might be able to try it too.



  • @sebastian-roth Hi! Thx for answer, you guys are great! i think you can mark this topic as solved, i did a different method for fix, but your method probably going to work too.


  • Developer

    @thiagotw What do you see when running sudo apt-get -f install? Any errors? If not try apt-get install apache2 libapache2-mod-php7.1 php7.1 and see what happens. I am sure you will see an error.



  • @wayne-workman Thx for the fast answer,
    So i did what you suggest, but still get the same error.
    I remembered something that happened during the ubuntu update, an error, which damaged some packages,
    so I used sudo apt-get remove apache2 to remove apache and those damaged files manually it worked .
    However I was not sure how much damage was, so I reinstalled everything.


  • Moderator

    @thiagotw Sudo might work - I recommend actually becoming root first. Like this:

    sudo -i
    # Navigate to fogproject/bin
    ./installfog.sh
    

    The first line makes you root properly, it does an actual full login and sets the right environment variables for root.

    Does this server have internet access? Can you ping www.google.com or 8.8.8.8 ?



  • @wayne-workman Should i use sudo ./installfog.sh ? because i did and got the same error.


  • Moderator

    @thiagotw Looks like you’re not root when you run the installer.


Log in to reply
 

520
Online

39.4k
Users

11.1k
Topics

105.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.