I want to install Magento CE 2.2.2 (with sample data) in my machine MacOS High Sierra (10.13.2), PHP 7.0 and Apache2. For the installation on Ubuntu 16.04 with Nginx and PHP7.0-FPM, See after this.
- Download the installation file from magento website (https://magento.com/tech-resources/download). I downloaded the file with sample data in tar.bz2 format
- Extract the compressed file into your web root. I extract them in ‘magentoce222’ directory.
- Create a virtualhost
Modify /usr/local/etc/httpd/extra/httpd-vhosts.conf. then add this:
1234567891011121314<VirtualHost *:80>ServerName magentoce222.localServerAlias www.magentoce222.localDocumentRoot "/Library/WebServer/Documents/Projects/magentoce222"DirectoryIndex index.php<Directory "/Library/WebServer/Documents/Projects/magentoce222">AllowOverride AllAllow from AllRequire all granted</Directory>ErrorLog "/usr/local/var/log/httpd/magentoce222_error.log"CustomLog "/usr/local/var/log/httpd/magentoce222_access.log" common</VirtualHost>
Save the file.
Then modify /private/etc/hosts. Then insert this:
1127.0.0.1 magentoce222.local
Save the file.
Then restart apache server
1sudo apachectl restart
- Open the site on the browser: http://magentoce222.local/
Follow the instruction (Agree the terms and condition, check the readiness, the database addition (create the database manually), web config, timezone (mine: western indonesia time (indonesia/jakarta)
So here is the local config:
12Store address: http://magentoce222.local/Admin address: http://magentoce222.local/admin_sjqexh
Then click ‘Install’ button.
Success! - When I opened the admin page, it need to be reindexed and the cache need to be cleared:
12php bin/magento indexer:reindexphp bin/magento c:f - On the frontpage, I got the grid for the products (hot sellers section) not good enough. not like on http://magentoce215.local/
- INSTALL MSP VIA COMPOSER:
12345678910111213141516171819Satrias-MacBook-Pro:~ teddy$ cd /Library/WebServer/Documents/Projects/magentoce222/Satrias-MacBook-Pro:magentoce222 teddy$ composer -VComposer version 1.6.2 2018-01-05 15:28:41Satrias-MacBook-Pro:magentoce222 teddy$ composer require msp/devtoolsAuthentication required (repo.magento.com):Username: 491a468ba9afd310d3eac792647361bePassword:Do you want to store credentials for repo.magento.com in /Users/teddy/.composer/auth.json ? [Yn] YUsing version ^1.2 for msp/devtools./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)Package operations: 2 installs, 0 updates, 0 removals- Installing msp/common (0.1.5): Downloading (100%)- Installing msp/devtools (1.2.9): Downloading (100%)Package sjparkinson/static-review is abandoned, you should avoid using it. Use phpro/grumphp instead.Writing lock fileGenerating autoload files
Enable it:
123456789Satrias-MacBook-Pro:magentoce222 teddy$ php bin/magento module:enable MSP_Common MSP_DevToolsThe following modules have been enabled:- MSP_Common- MSP_DevToolsTo make sure that the enabled modules are properly registered, run 'setup:upgrade'.Cache cleared successfully.Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes.Info: Some modules might require static view files to be cleared. To do this, run 'module:enable' with the --clear-static-content option to clear them.
run setup:upgrade
1Satrias-MacBook-Pro:magentoce222 teddy$ php bin/magento setup:upgrade
Then enable it also in the admin page : Stores -> Configuration -> MAGESPECIALIST
NOTE: I GOT THIS ERROR AFTER ENABLE IT:
One or more integrations have been reset because of a change to their xml configs.
SOLUTION: I NEED TO DISABLE AN EXTENSION:
php bin/magento module:disable Shopial_Facebook
REF: https://github.com/magento/magento2/issues/12095
The installation on Ubuntu 16.04 with Nginx and PHP7.0-FPM
ref: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/nginx.html
- Download Magento 2.2.2 (with sample data)
- Create the config file
1sudo gedit /etc/nginx/sites-available/magento222.test
Here is the content:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206server {listen 80;server_name magento222.test;set $MAGE_ROOT /home/teddy/Documents/works/magento222;root $MAGE_ROOT;index index.php;autoindex off;charset UTF-8;error_page 404 403 = /errors/404.php;#add_header "X-UA-Compatible" "IE=Edge";client_max_body_size 100M;# PHP entry point for setup applicationlocation ~* ^/setup($|/) {root $MAGE_ROOT;location ~ ^/setup/index.php {fastcgi_split_path_info ^(.+?\.php)(/.*)$;fastcgi_buffers 1024 4k;fastcgi_read_timeout 600s;fastcgi_connect_timeout 600s;fastcgi_pass unix:/run/php/php7.0-fpm.sock; #FOR AWS SERVER#fastcgi_pass 127.0.0.1:9000;#fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}location ~ ^/setup/(?!pub/). {deny all;}location ~ ^/setup/pub/ {add_header X-Frame-Options "SAMEORIGIN";}}# PHP entry point for update applicationlocation ~* ^/update($|/) {root $MAGE_ROOT;location ~ ^/update/index.php {fastcgi_split_path_info ^(/update/index.php)(/.+)$;fastcgi_pass unix:/run/php/php7.0-fpm.sock; #FOR AWS SERVER#fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $fastcgi_path_info;include fastcgi_params;}# Deny everything but index.phplocation ~ ^/update/(?!pub/). {deny all;}location ~ ^/update/pub/ {add_header X-Frame-Options "SAMEORIGIN";}}location / {try_files $uri $uri/ /index.php?$args;}location /pub/ {location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {deny all;}alias $MAGE_ROOT/pub/;add_header X-Frame-Options "SAMEORIGIN";}location ~ ^/pub/static/version {rewrite ^/pub/static/(version\d*/)?(.*)$ /pub/static/$2 last;}location /static/ {# Uncomment the following line in production mode# expires max;# Remove signature of the static files that is used to overcome the browser cachelocation ~ ^/static/version {rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;}location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {add_header Cache-Control "public";add_header X-Frame-Options "SAMEORIGIN";expires +1y;if (!-f $request_filename) {rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;}}location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {add_header Cache-Control "no-store";add_header X-Frame-Options "SAMEORIGIN";expires off;if (!-f $request_filename) {rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;}}if (!-f $request_filename) {rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;}add_header X-Frame-Options "SAMEORIGIN";}location /media/ {try_files $uri $uri/ /get.php?$args;location ~ ^/media/theme_customization/.*\.xml {deny all;}location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {add_header Cache-Control "public";add_header X-Frame-Options "SAMEORIGIN";expires +1y;try_files $uri $uri/ /get.php?$args;}location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {add_header Cache-Control "no-store";add_header X-Frame-Options "SAMEORIGIN";expires off;try_files $uri $uri/ /get.php?$args;}add_header X-Frame-Options "SAMEORIGIN";}location /media/customer/ {deny all;}location /media/downloadable/ {deny all;}location /media/import/ {deny all;}# PHP entry point for main applicationlocation ~ (index|get|static|report|404|503)\.php$ {try_files $uri =404;fastcgi_pass unix:/run/php/php7.0-fpm.sock; #FOR AWS SERVER#fastcgi_pass 127.0.0.1:9000;fastcgi_buffers 1024 4k;fastcgi_read_timeout 600s;fastcgi_connect_timeout 600s;# to configure profiler in Magento 2fastcgi_param MAGE_PROFILER html;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;#include fastcgi_params;#FOR DEVELOPMENT MODE ONLY - BEGINfastcgi_param MAGE_IS_DEVELOPER_MODE true;fastcgi_param PHP_VALUE display_startup_errors=on;fastcgi_param PHP_VALUE display_errors=on;fastcgi_param PHP_VALUE html_errors=on;fastcgi_param PHP_VALUE log_errors=on;fastcgi_param PHP_VALUE error_log=/home/teddy/Documents/works/magento222/var/log/system.log;#FOR DEVELOPMENT MODE ONLY - ENDinclude fastcgi_params;#FOR DEBUGGING WITH XDEBUG - BEGIN#fastcgi_read_timeout 600;#FOR DEBUGGING WITH XDEBUG - END}gzip on;gzip_disable "msie6";gzip_comp_level 6;gzip_min_length 1100;gzip_buffers 16 8k;gzip_proxied any;gzip_typestext/plaintext/csstext/jstext/xmltext/javascriptapplication/javascriptapplication/x-javascriptapplication/jsonapplication/xmlapplication/xml+rssimage/svg+xml;gzip_vary on;# Banned locations (only reached if the earlier PHP entry point regexes don't match)location ~* (\.php$|\.htaccess$|\.git) {deny all;}} - Enable file config
1sudo ln -s /etc/nginx/sites-available/magento222.test /etc/nginx/sites-enabled/magento222.test - Register the host on my system
1sudo gedit /etc/hosts
Like this:
123...127.0.0.1 magento222.test... - CHECK THE NGINX SETTING AND RESTART IT:
123teddy@teddy:~$ sudo nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successful
1sudo systemctl restart nginx
- Set file permission and owner:
123456teddy@teddy:~/Documents/works/magento222$ sudo suroot@teddy:/home/teddy/Documents/works/magento222# find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;root@teddy:/home/teddy/Documents/works/magento222# find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;root@teddy:/home/teddy/Documents/works/magento222# chown -R :www-data .root@teddy:/home/teddy/Documents/works/magento222# chmod u+x bin/magentoroot@teddy:/home/teddy/Documents/works/magento222# exit
Then
12sudo chown www-data -R var/ pub/ app/etc/ setup/ generated/sudo chmod -R 777 var/ pub/ app/etc/ setup/ generated/
- Test: –> NOT WORKING! I GOT BLANK PAGE. MAY BE SOMETHING WRONG ON NGINX ‘magento222.test’ CONFIG ERROR. BUT WHERE?
IT ALSO REALLY WORTH TO CHECK THE ERROR MESSAGE FROM /var/log/nginx/error.log
OK. I FOUND THE SOLUTION (ref: https://github.com/magento/magento2/issues/2504). I CAN DO ONE OF THIS SOLUTION (THE LATTER IS PREFERRED):
1. CHANGE ‘cgi.fix_pathinfo’ TO ‘1’ IN /etc/php/7.0/fpm/php.ini
2. MODIFY THE CONFIG FILE IN /etc/nginx/sites-available/magento222.test THEN ADD ‘fastcgi_split_path_info ^(.+?\.php)(/.*)$;’ JUST BELOW/IN ‘location ~ ^/setup/index.php {‘. PLS SEE THE FIXED SETTING ABOVE –> PREFERRED. BECAUSE THIS PROBLEM ONLY WHEN I TRIED TO SETUP FOR THE FIRST TIME.
I ALSO GOT ‘connection timeout’ ERROR WHEN TRYING TO INSTALL IT. SO I ADDED A FEW MORE LINES ON ‘setup’ SECTION ON THE NGINX CONFIG LIKE THIS:
1234567...location ~ ^/setup/index.php {fastcgi_split_path_info ^(.+?\.php)(/.*)$;fastcgi_buffers 1024 4k;fastcgi_read_timeout 600s;fastcgi_connect_timeout 600s;...
ref: https://www.digitalocean.com/community/questions/nginx-php5-fpm-error-110-connection-timed-out
MAY BE I NEED TO DO THE SAME ON THE ‘update’ SECTION???
3. To enable Magento 2 profiler for nginx, pls add ‘fastcgi_param MAGE_PROFILER html;’ like this:
12345678910...# PHP entry point for main applicationlocation ~ (index|get|static|report|404|503)\.php$ {...fastcgi_connect_timeout 600s;# to configure profiler in Magento 2fastcgi_param MAGE_PROFILER html;...}
NOTE: THE PROFILER WOULD SLOW THE PAGE LOAD!!!
ref: https://magento.stackexchange.com/questions/192401/how-to-enable-profiler-on-nginxI HAVE TO USE APACHE TO INSTALL IT
- Compile
12teddy@teddy:~/Documents/works/magento222$ sudo su -s /bin/bash www-datawww-data@teddy:/home/teddy/Documents/works/magento222$ php bin/magento setup:upgrade --keep-generated && php bin/magento setup:di:compile && php bin/magento setup:static-content:deploy -f --language en_AU --language en_US && php bin/magento indexer:reindex && php bin/magento cache:clean && php bin/magento cache:flush
OR (BECAUSE I GOT ERROR: ‘Area code not set: Area code must be set before starting a session. … vendor/magento/framework/Session/SessionManager.php’)
1php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy -f && php bin/magento indexer:reindex && php bin/magento cache:flush
Make sure the php version for cli is php 7.0.x (php 7.0.x for magento 2.2.2), if not, pls change the php cli version:
1sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php
If you get an error like ‘Class Magento\Framework\App\ResourceConnection\Proxy does not exist’ on the cli and/or the browser, then you need to remove ‘generated’ directory first.
12sudo rm -rf generated/*sudo rm -rf pub/static/*
then run the setup:upgrade and the other commands like usual
I GOT ANOTHER ERROR:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145www-data@teddy:/home/teddy/Documents/works/magento222$ php bin/magento setup:static-content:deploy -f && php bin/magento indexer:reindex && php bin/magento cache:clean && php bin/magento cache:flushDeploy using quick strategyfrontend/Magento/blank/en_US 0/2241 >--------------------------- 0% % < 1 sec#0 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()#1 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))#2 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))#3 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile('mage/gallery/ga...', Array)#4 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(136): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package))#5 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(107): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false)#6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}()#7 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/State.php(186): call_user_func_array(Object(Closure), Array)#8 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(108): Magento\Framework\App\State->emulateAreaCode('frontend', Object(Closure))#9 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(281): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), Array)#10 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(200): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package))#11 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(162): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Magent...', Array, Array)#12 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): Magento\Deploy\Process\Queue->process()#13 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticContent.php(109): Magento\Deploy\Strategy\QuickDeploy->deploy(Array)#14 /home/teddy/Documents/works/magento222/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): Magento\Deploy\Service\DeployStaticContent->deploy(Array)#15 /home/teddy/Documents/works/magento222/vendor/symfony/console/Command/Command.php(241): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#16 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#17 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#18 /home/teddy/Documents/works/magento222/vendor/magento/framework/Console/Cli.php(104): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#19 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(117): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#20 /home/teddy/Documents/works/magento222/bin/magento(23): Symfony\Component\Console\Application->run()frontend/Magento/blank/en_US 1267/2241 ===============>------------ 56% % 1 sec#0 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()#1 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))#2 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))#3 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile('css/styles.less', Array)#4 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(136): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package))#5 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(107): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false)#6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}()#7 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/State.php(186): call_user_func_array(Object(Closure), Array)#8 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(108): Magento\Framework\App\State->emulateAreaCode('frontend', Object(Closure))#9 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(281): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), Array)#10 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(200): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package))#11 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(162): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Magent...', Array, Array)#12 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): Magento\Deploy\Process\Queue->process()#13 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticContent.php(109): Magento\Deploy\Strategy\QuickDeploy->deploy(Array)#14 /home/teddy/Documents/works/magento222/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): Magento\Deploy\Service\DeployStaticContent->deploy(Array)#15 /home/teddy/Documents/works/magento222/vendor/symfony/console/Command/Command.php(241): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#16 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#17 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#18 /home/teddy/Documents/works/magento222/vendor/magento/framework/Console/Cli.php(104): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#19 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(117): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#20 /home/teddy/Documents/works/magento222/bin/magento(23): Symfony\Component\Console\Application->run()#21 {main}#0 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()#1 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))#2 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))#3 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile('css/email-fonts...', Array)#4 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(136): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package))#5 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(107): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false)#6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}()#7 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/State.php(186): call_user_func_array(Object(Closure), Array)#8 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(108): Magento\Framework\App\State->emulateAreaCode('frontend', Object(Closure))#9 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(281): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), Array)#10 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(200): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package))#11 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(162): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Magent...', Array, Array)#12 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): Magento\Deploy\Process\Queue->process()#13 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticContent.php(109): Magento\Deploy\Strategy\QuickDeploy->deploy(Array)#14 /home/teddy/Documents/works/magento222/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): Magento\Deploy\Service\DeployStaticContent->deploy(Array)#15 /home/teddy/Documents/works/magento222/vendor/symfony/console/Command/Command.php(241): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#16 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#17 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#18 /home/teddy/Documents/works/magento222/vendor/magento/framework/Console/Cli.php(104): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#19 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(117): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#20 /home/teddy/Documents/works/magento222/bin/magento(23): Symfony\Component\Console\Application->run()#21 {main}#0 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()#1 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))#2 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))#3 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile('css/styles-m.le...', Array)#4 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(136): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package))#5 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(107): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false)#6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}()#7 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/State.php(186): call_user_func_array(Object(Closure), Array)#8 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(108): Magento\Framework\App\State->emulateAreaCode('frontend', Object(Closure))#9 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(281): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), Array)#10 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(200): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package))#11 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(162): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Magent...', Array, Array)#12 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): Magento\Deploy\Process\Queue->process()#13 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticContent.php(109): Magento\Deploy\Strategy\QuickDeploy->deploy(Array)#14 /home/teddy/Documents/works/magento222/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): Magento\Deploy\Service\DeployStaticContent->deploy(Array)#15 /home/teddy/Documents/works/magento222/vendor/symfony/console/Command/Command.php(241): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#16 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#17 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#18 /home/teddy/Documents/works/magento222/vendor/magento/framework/Console/Cli.php(104): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#19 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(117): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#20 /home/teddy/Documents/works/magento222/bin/magento(23): Symfony\Component\Console\Application->run()#21 {main}#0 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()#1 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))#2 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))#3 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile('css/styles-l.le...', Array)#4 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(136): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package))#5 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(107): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false)#6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}()#7 /home/teddy/Documents/works/magento222/vendor/magento/framework/App/State.php(186): call_user_func_array(Object(Closure), Array)#8 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployPackage.php(108): Magento\Framework\App\State->emulateAreaCode('frontend', Object(Closure))#9 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(281): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), Array)#10 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(200): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package))#11 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Process/Queue.php(162): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Magent...', Array, Array)#12 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): Magento\Deploy\Process\Queue->process()#13 /home/teddy/Documents/works/magento222/vendor/magento/module-deploy/Service/DeployStaticContent.php(109): Magento\Deploy\Strategy\QuickDeploy->deploy(Array)#14 /home/teddy/Documents/works/magento222/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): Magento\Deploy\Service\DeployStaticContent->deploy(Array)#15 /home/teddy/Documents/works/magento222/vendor/symfony/console/Command/Command.php(241): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#16 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#17 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#18 /home/teddy/Documents/works/magento222/vendor/magento/framework/Console/Cli.php(104): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#19 /home/teddy/Documents/works/magento222/vendor/symfony/console/Application.php(117): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#20 /home/teddy/Documents/works/magento222/bin/magento(23): Symfony\Component\Console\Application->run()#21 {main}Compilation from source: /home/teddy/Documents/works/magento222/vendor/magento/theme-frontend-blank/web/css/email-inline.lessvariable @baseUrl is undefined in file /home/teddy/Documents/works/magento222/var/view_preprocessed/pub/static/frontend/Magento/blank/en_US/css/source/_email-extend.less in _email-extend.less on line 19, column 1317| // as the latter will cause font rendering issues if the web fonts are inaccessible.18|19| @import url("@{baseUrl}css/email-fonts.css");20|Compilation from source: /home/teddy/Documents/works/magento222/vendor/magento/theme-frontend-blank/web/css/print.lessvariable @color-black is undefined in file /home/teddy/Documents/works/magento222/var/view_preprocessed/pub/static/frontend/Magento/blank/en_US/css/print.less in print.less on line 25, column 1623| -webkit-filter: none !important; // Use in 41 Chrome24| background: transparent !important;25| color: @color-black !important;26| filter: none !important;27| text-shadow: none !important;28| }Compilation from source: /home/teddy/Documents/works/magento222/vendor/magento/theme-frontend-blank/web/css/email.lessvariable @baseUrl is undefined in file /home/teddy/Documents/works/magento222/var/view_preprocessed/pub/static/frontend/Magento/blank/en_US/css/source/_email-extend.less in _email-extend.less on line 19, column 1317| // as the latter will cause font rendering issues if the web fonts are inaccessible.18|19| @import url("@{baseUrl}css/email-fonts.css");20|[Magento\Framework\Exception\FileSystemException]Cannot read contents from file "/home/teddy/Documents/works/magento222/pub/static/frontend/Magento/blank/en_US/mage/gallery/gallery.css" Warning!file_get_contents(/home/teddy/Documents/works/magento222/pub/static/frontend/Magento/blank/en_US/mage/gallery/gallery.css): failed to open stream: No suchfile or directorysetup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>]...
SO REMOVE SOME FILES MANUALLY:
1234567teddy@teddy:~/Documents/works/magento222$ sudo rm -rf generated/*teddy@teddy:~/Documents/works/magento222$ sudo rm -rf pub/static/*teddy@teddy:~/Documents/works/magento222$ sudo rm -rf var/*ONLY IF NEEDED:teddy@teddy:~/Documents/works/magento222$ sudo chown www-data -R var/ pub/ app/etc/ setup/ generated/teddy@teddy:~/Documents/works/magento222$ sudo chmod -R 777 var/ pub/ app/etc/ setup/ generated/
RUN THE DEPLOY COMMAND AGAIN! - Test: http://magento222.test/
Admin page: http://magento222.test/admin_14p856