poppabear8883 / UNIT3D-INSTALLER

Provisioner and Installer for the UNIT3D Torrent Tracker Platform.
49 stars 29 forks source link

E: Package 'debconf-utils' has no installation candidate #10

Closed JohnyBeGood closed 6 years ago

JohnyBeGood commented 6 years ago

Hello,

I'm on fresh install of Ubuntu 18.04.1 LTS and when I ran the installer I got this:

admin@ubuntu_test:~$ git clone https://github.com/ServNX/UNIT3D-INSTALLER.git
Cloning into 'UNIT3D-INSTALLER'...
remote: Counting objects: 173, done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 173 (delta 70), reused 155 (delta 52), pack-reused 0
Receiving objects: 100% (173/173), 39.88 KiB | 7.98 MiB/s, done.
Resolving deltas: 100% (70/70), done.
admin@ubuntu_test:~$ ls
UNIT3D-INSTALLER
admin@ubuntu_test:~$ cd UNIT3D-INSTALLER
admin@ubuntu_test:~/UNIT3D-INSTALLER$ ls
artisan  box.json  composer.json  composer.lock  install.sh  phpunit.xml  README.md  src  tests  tools  ubuntu.sh
admin@ubuntu_test:~/UNIT3D-INSTALLER$ sudo ./install.sh

 Preparing Environment For The Installer ...
=============================================

 Adding PPA Repositories ...
 OK

 Updating Packages ...
 OK

 Installing PHP ...
E: Package 'debconf-utils' has no installation candidate
 OK

 Installing Composer ...
./ubuntu.sh: line 32: php: command not found
sudo: php: command not found
 OK

 Adding Installer Packages ...
 OK

 Launching The Installer ...
=============================================
./ubuntu.sh: line 42: php: command not found

Line 42 in ubuntu.sh has php artisan install Did I miss something? Do I still have to manually install all of prerequisites from here https://github.com/HDInnovations/UNIT3D/wiki/Manual-Install ?

Thanks!

HDVinnie commented 6 years ago

A repost from @poppabear8883

Ok, I will comment on what I know about this error and close the issue.

This error normally occurs when the script was unsuccessful at installing PHP during the environment setup.

The code responsible for this is below:

if ! [ -x "$(command -v php)" ]; then
    echo -e "\n$Cyan Updating Packages ... $Color_Off"
    apt-get -qq update
    echo -e "$IGreen OK $Color_Off"

    echo -e "\n$Cyan Installing PHP ... $Color_Off"
    apt-get install -qq curl debconf-utils php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml php7.2-fpm > /dev/null
    echo -e "$IGreen OK $Color_Off"
fi

Tested on:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial

Results of the environment setup: image

If yours does not look like this then likely something went wrong

Normally the solution to this issue is to simply re-run the install.sh.

Otherwise you have a couple options:

  1. Run the below command manually

    sudo add-apt-repository -y ppa:ondrej/php && sudo apt-get update && sudo apt-get install -y curl debconf-utils php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml php7.2-fpm

    Then re-run the installer

  2. Reinstall the OS and try again ... (never had to do this personally)

In the future we hope to improve in this area.

poppabear8883 commented 6 years ago

Refer to issue #9

JohnyBeGood commented 6 years ago

Re-running install.sh outputs same error. Here's what I get when running suggested command manually:

admin@ubuntu_test:~/UNIT3D-INSTALLER$ sudo add-apt-repository -y ppa:ondrej/php && sudo apt-get update && sudo apt-get install -y curl debconf-utils php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml php7.2-fpm
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://ppa.launchpad.net/nginx/development/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Reading package lists... Done
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://ppa.launchpad.net/nginx/development/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package debconf-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  debconf-i18n

E: Package 'debconf-utils' has no installation candidate
admin@ubuntu_test:~/UNIT3D-INSTALLER$
poppabear8883 commented 6 years ago

Thanks for the report .. i am working on a fix

poppabear8883 commented 6 years ago

Can you provide me details on how you installed your Ubuntu OS and from what Source ?

poppabear8883 commented 6 years ago

More graceful error handling: https://github.com/ServNX/UNIT3D-INSTALLER/commit/c38a730d3598dd6bb984c7193fb8861c523b9121

About this issue This happens when you try to install a package in which APT does not have any idea about.

Both 16.04 and 18.04 provides this package in the default Ubuntu repositories.

16.04: https://launchpad.net/ubuntu/xenial/+package/debconf-utils 18.04: https://launchpad.net/ubuntu/bionic/+package/debconf-utils

This leads me to believe that in your case, your /etc/apt/sources.list file has an issue (old repositories or corrupted file)

I will keep this issue open until we can determine the actual case!

JohnyBeGood commented 6 years ago

I downloaded ubuntu-18.04.1-live-server-amd64.iso from https://www.ubuntu.com/download/server and did standard system update. That's all.

JohnyBeGood commented 6 years ago

Here's output of /etc/apt/sources.list https://prnt.sc/kgrx1i

poppabear8883 commented 6 years ago

Doesn't look correct ...

The default sources.list is:

#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

Please use this and re-run the installer

poppabear8883 commented 6 years ago

Just for reference: https://packages.ubuntu.com/bionic/debconf-utils

Clearly shows [universe] repositories

Which is what you are missing in your sources.list file ...

JohnyBeGood commented 6 years ago

Got it to work! After I replaced sources.list file and commented out the ones that where there and did system update after that installer completed without any errors! Still don't understand what could've modified that file in a fresh install. Thanks for your help!