Instalacja Laravela na Debianie

0

Witam,
Zaktualizowałem PHP do 7.2 na moim serwerze i gdy próbuję teraz zainstalować najnowszą wersję Laravela(5.6) to część plików się pojawia a następnie otrzymuję taki błąd. Proszę o pomoc w wyjaśnieniu co należy poprawić, nic z tego nie rozumiem ;(

Do not run Composer as root/super user! See https://getcomposer.org/root for det    ails
Installing laravel/laravel (v5.6.12)
  - Installing laravel/laravel (v5.6.12): Loading from cache
Created project in /var/www/html/laravel
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit 7.1.x-dev requires ext-dom * -> the requested PHP extensio    n dom is missing from your system.
    - phpunit/phpunit 7.0.x-dev requires ext-dom * -> the requested PHP extensio    n dom is missing from your system.
    - phpunit/phpunit 7.0.3 requires ext-dom * -> the requested PHP extension do    m is missing from your system.
    - phpunit/phpunit 7.0.2 requires ext-dom * -> the requested PHP extension do    m is missing from your system.
    - phpunit/phpunit 7.0.1 requires ext-dom * -> the requested PHP extension do    m is missing from your system.
    - phpunit/phpunit 7.0.0 requires ext-dom * -> the requested PHP extension do    m is missing from your system.
    - Installation request for phpunit/phpunit ^7.0 -> satisfiable by phpunit/ph    punit[7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.x-dev, 7.1.x-dev].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.2/cli/php.ini
    - /etc/php/7.2/cli/conf.d/10-opcache.ini
    - /etc/php/7.2/cli/conf.d/10-pdo.ini
    - /etc/php/7.2/cli/conf.d/20-calendar.ini
    - /etc/php/7.2/cli/conf.d/20-ctype.ini
    - /etc/php/7.2/cli/conf.d/20-exif.ini
    - /etc/php/7.2/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.2/cli/conf.d/20-ftp.ini
    - /etc/php/7.2/cli/conf.d/20-gd.ini
    - /etc/php/7.2/cli/conf.d/20-gettext.ini
    - /etc/php/7.2/cli/conf.d/20-iconv.ini
    - /etc/php/7.2/cli/conf.d/20-json.ini
    - /etc/php/7.2/cli/conf.d/20-mbstring.ini
    - /etc/php/7.2/cli/conf.d/20-phar.ini
    - /etc/php/7.2/cli/conf.d/20-posix.ini
    - /etc/php/7.2/cli/conf.d/20-readline.ini
    - /etc/php/7.2/cli/conf.d/20-shmop.ini
    - /etc/php/7.2/cli/conf.d/20-sockets.ini
    - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.2/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.2/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.2/cli/conf.d/20-tokenizer.ini
  You can also run `php --ini` inside terminal to see which files are used by PH    P in CLI mode.
1

Komunikat jest dosyć jasny:

(...) requires ext-dom * -> the requested PHP extension (...) is missing from your system.

0

W takim razie jak zainstalować PHP 7.2, który jest wymagany przez Laravela 5.6 żeby jednocześnie zachować pliki z PHP 7.0?

0

Przeczytaj komunikat raz jeszcze, uważnie.
Mówi on You have an invalid PHP version installed czy You are missing an extension?

2

nie skonfigurowałeś php.ini i tyle w temacie

0

Teraz to już w ogóle napsułem na tym serwerze... :D Można Debiana przywrócić do stanu ''fabrycznego'' z poziomu cmd? Lub skasować composera i php aby móc to zainstalować na nowo i poprawnie?

1
apt install php7.1-xml
1

Ok, raczej 7.2 bo taką masz wersje php jak się zdaje

0

Skasowałem Composera oraz PHP abyzrobić wszystko od nowa i tym razem mam błąd przy instalacji PHP :(

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.2-cli : Depends: php7.2-opcache but it is not going to be installed
              Depends: libc6 (>= 2.27) but 2.24-11+deb9u3 is to be installed
              Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Ktoś? Coś? :( Można w jakiś sposób wyczyścić ten serwer z wszelkich zainstalowanych rzeczy?

1

a potrafisz czytać te błędy? bo mam wrażenie, że nie. Przecież wyraźnie napisał, że brakuje mu bibliotek które musisz doinstalować.

0

Można w jakiś sposób wyczyścić ten serwer z wszelkich zainstalowanych rzeczy?

Tylko poprzez ponowne zainstalowanie całego systemu.

Coś namieszałeś w paczkach - odpal apt install libsodium23 i pokaż rezultat.

0

Wynik apt install libsodium23:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsodium23 : Depends: libc6 (>= 2.25) but 2.24-11+deb9u3 is to be installed
E: Unable to correct problems, you have held broken packages.

0

A zrobiłeś apt update?

0

Tak, robiłem i za każdym razem otrzymałem

Get:1 http://packages.dotdeb.org jessie InRelease [9,872 B]
Hit:3 http://security.debian.org stretch/updates InRelease
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Hit:5 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease
Hit:7 http://cdn-fastly.deb.debian.org/debian stretch Release
Ign:8 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic InRelease
Get:4 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease [20.7 kB]
Err:1 http://packages.dotdeb.org jessie InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E9C74FEEA2098A6E
Hit:9 https://packages.sury.org/php stretch InRelease
Get:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease [20.8 kB]
Err:10 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release
  404  Not Found
Err:4 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
Err:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
Reading package lists... Done
W: GPG error: http://packages.dotdeb.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E9C74FEEA2098A6E
E: The repository 'http://packages.dotdeb.org jessie InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
E: The repository 'http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
E: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:9 and /etc/apt/sources.list.d/php.list:1
0

wpisz dpkg --list i tam poda ci co masz zainstalowane. Usuwaj i instaluj co chcesz. Nie ma jakiejś większej teorii.

1

Z tego co zauważyłem to kompletnie lajkujesz w debianie.

Do laravel'a 5.6 wymagana jest wersja PHP 7.1.3 oraz kilka uruchomionych bibliotek, które znajdziesz na głównej stronie Laravel'a https://laravel.com/docs/5.6/installation. Biblioteki uruchamiasz usuwając ';'. w pliku php.ini. Zapisujesz i restart apache2 (pod warunkiem że jest zainstalowany). Cała filozofia. ( ofc composer u must have... )

Nie mam pojęcia co mogłeś zainstalować lub edytować na serwie. Moim zdaniem lepiej będzie jeżeli usuniesz system i nagrasz ponownie, php/apache itp. trzymając się wytycznych. +/- 20-30min roboty.

Chyba że chcesz się bawić w deva :) Zawsze czegoś się nauczysz.

Co do poprawnej instalacji phpmyadmin apache2 itp. jest całkiem sporo poradników dla lajków.

0

Zrobiłem tak jak polecił bonko (przy okazji dzięki wielkie! :) )
Zainstalowałem PHP 7.2, Composera, Apache2, Gita i wróciłem do punktu wyjścia. Znowu otrzymuję komunikat:

Installing laravel/laravel (v5.6.12)
    Failed to download laravel/laravel from dist: The zip extension and unzip command are both missing, skipping.
Your command-line PHP is using multiple ini files. Run `php --ini` to show them.
    Now trying to download from source
  - Installing laravel/laravel (v5.6.12): Cloning 4369e9144c from cache
Created project in /var/www/html/laravel
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v5.6.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.14 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.12 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.11 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.10 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework 5.6.x-dev requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[5.6.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.2, v5.6.3, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.2/cli/php.ini
    - /etc/php/7.2/cli/conf.d/10-opcache.ini
    - /etc/php/7.2/cli/conf.d/10-pdo.ini
    - /etc/php/7.2/cli/conf.d/15-xml.ini
    - /etc/php/7.2/cli/conf.d/20-calendar.ini
    - /etc/php/7.2/cli/conf.d/20-ctype.ini
    - /etc/php/7.2/cli/conf.d/20-dom.ini
    - /etc/php/7.2/cli/conf.d/20-exif.ini
    - /etc/php/7.2/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.2/cli/conf.d/20-ftp.ini
    - /etc/php/7.2/cli/conf.d/20-gettext.ini
    - /etc/php/7.2/cli/conf.d/20-iconv.ini
    - /etc/php/7.2/cli/conf.d/20-json.ini
    - /etc/php/7.2/cli/conf.d/20-phar.ini
    - /etc/php/7.2/cli/conf.d/20-posix.ini
    - /etc/php/7.2/cli/conf.d/20-readline.ini
    - /etc/php/7.2/cli/conf.d/20-shmop.ini
    - /etc/php/7.2/cli/conf.d/20-simplexml.ini
    - /etc/php/7.2/cli/conf.d/20-sockets.ini
    - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.2/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.2/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.2/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.2/cli/conf.d/20-wddx.ini
    - /etc/php/7.2/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.2/cli/conf.d/20-xsl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

0

Masz jak byk napisane: the requested PHP extension mbstring is missing from your system.

1

Naucz się czytać logi w przeciwnym razie ciężko cokolwiek będziesz mógł napisać / wykonać / update'ować itp.... itd...

Sprawdź w pliku php.ini czy mbstring jest aktywny (nie jest, ponieważ nie ma go na liście), więc usuń przy mbstring znak ';' - zapisz i restart apache. Możesz uruchamiać poprzez komendy w cmd dodatki. W sieci jest dosyć sporo o tym.

A poniżej szybki strzał, który zrób.

sudo apt-get install php7.2-mbstring

sudo apt-get install libapache2-mod-php7.2

aa i standardowo po wykonaniu edycji przy plikach php lub instalacji php wykonuj restart apache

sudo service apache2 restart

lub zamiast 7.2 wstaw 7.0 - możliwe że odpali mbstring - z tego co pamiętam to stare wersje łapał bez problemu.

0

Ok, wszystko już działa! Dziękuję serdecznie wszystkim, którzy próbowali mi pomóc oraz przepraszam jeżeli kogoś wkurzyłem swoją niewiedzą... :P

Laravel został prawidłowo zainstalowany lecz jak wchodzę na serwer to pojawia mi się lista plików/folderów laravela. Co musiałbym zrobić aby po wejściu na serwer pojawił się normalnie projekt? Laravel jest zainstalowany w folderze html.

1

url gdzie masz laravel'a i na koncu dopisz /public poczytaj na necie w jaki sposób to zmienić. Dużo pisania.

NP. www.onet.pl/laravel/public www.onet.pl/publicc

0

Ok, ogarnąłem :) Dzięki jeszcze raz.

0

To znowu ja :D

Czy może mi ktoś powiedzieć w jaki sposób najlepiej/najłatwiej wrzucić projekt, który mam lokalnie na kompie na wykupiony i skonfigurowany wspólnie z Wami serwer? Na serwerze jest zainstalowany czysty Laravel i chce po prostu podmienić go na projekt, który również mam w Laravelu tylko że lokalnie.

0

na nowym hostingu stwórz bazę->import bazy->zaktualizuj dane w app/config/database->podmień pliki frameworka

0

Baza już jest skonfigurowana i gotowa. Chodzi o podmianę plików. Można to zrobić przez PuTTy?

2

Na taki serwer najlepiej wrzucać gitem, robisz repo na bitbuckecie i normlanie pobierasz repo na serwer i wykonujesz wszystkie czynności które trzeba czyli composer install, php artisan migrate itp

1 użytkowników online, w tym zalogowanych: 0, gości: 1