Asked  2 Years ago    Answers:  5   Viewed   81 times

I'm trying to install laravel installer with the composer on my Ubuntu PC, but I get this error during the installation. `Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].

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

The error appears then I use this comment:

composer global require "laravel/installer"

 Answers

3

It says that it requires zip extension

laravel/installer v1.4.0 requires ext-zip...

Install using (to install the default version):

sudo apt install php-zip

Or, if you're running a specific version of PHP:

# For php v7.0
sudo apt-get install php7.0-zip

# For php v7.1
sudo apt-get install php7.1-zip

# For php v7.2
sudo apt-get install php7.2-zip

# For php v7.3
sudo apt-get install php7.3-zip

# For php v7.4
sudo apt-get install php7.4-zip
Saturday, August 13, 2022
2

When accessing a route, Laravel goes through your list of routes top to bottom, until it finds one that 'matches' at which point this route is immediately selected.

In your example, when trying to access /blog/bin using GET, it has two potential matches:

Route::get('/blog/{id}', '[email protected]');

and

Route::get('/blog/bin', '[email protected]');

In this case, Route::get('/blog/{id}', '[email protected]'); comes first so it would be selected.

As the previous answers correctly state, placing the /blog/bin route above the /blog/{id} route would solve the problem. However, this 'solution' leaves you open to a similar mistake in the future (when, for example, defining a /blog/example route and accidentally placing it under /blog/{id}). In addition, I personally think it is not very elegant to have the functioning of your routes depend on the order to place them in.

In my opinion, when possible, a more robust solution is to restrict the possible values that are accepted by /blog/{id} with a regex constraint.

For example, if you are using a numeric ID for your blogposts, you know that you only want to use route /blog/{id} if id is a number. Thus, you would define your route as follows:

Route::get('/blog/{id}', '[email protected]')->where('id', '[0-9]+');

Of course this is often not a possibility, for example if you use the post title as an id, but if there is some way to differentiate a post id from any other /blog/foo route, then this would be a possibility.

Tuesday, November 1, 2022
 
4

Just add them to the string.

return redirect()->away('http://bla.com?bla=bla');

The second parameter for this function is the http status that should be sent to the visitor. So when you add an array this is parsed as a 1.

Tuesday, August 23, 2022
1

I still can't use laravel new, but I found what was happening with composer.

Laravel 5.3 needs php5.6 or higher, otherwise will run an older laravel version. I upgrade to php5.6 with this steps: https://www.dev-metal.com/install-setup-php-5-6-ubuntu-14-04-lts/

then run

composer create-project laravel/laravel ProjectName

and it's done!

Thursday, September 15, 2022
 
43

JRE Install

:: Java Begin
START /WAIT %cd%JRE16jre-6u30-windows-i586.exe /s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 REBOOT=ReallySuppress
IF EXIST "%ALLUSERSPROFILE%DesktopJava Web Start.LNK" DEL "%ALLUSERSPROFILE%DesktopJava Web Start.LNK"
IF EXIST "%PUBLIC%DesktopJava Web Start.LNK" DEL "%PUBLIC%DesktopJava Web Start.LNK"
IF EXIST "%ALLUSERSPROFILE%Start MenuProgramsJava Web StartJava Web Start.LNK" RD /Q /S "%ALLUSERSPROFILE%Start MenuProgramsJava Web Start"
IF EXIST "%ALLUSERSPROFILE%MicrosoftWindowsStart MenuProgramsJava Web StartJava Web Start.LNK" RD /Q /S "%ALLUSERSPROFILE%MicrosoftWindowsStart MenuProgramsJava Web Start"
:: Java Configure on x86 systems
REG ADD "HKLMSOFTWAREJavaSoftJava Plug-in1.6.0_24" /v HideSystemTrayIcon /t REG_DWORD /d 1 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v NotifyDownload /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v NotifyInstall /t REG_DWORD /d 0 /f
REG DELETE "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun" /v SunJavaUpdateSched /f
:: Java End

speedup java:

java -Xshare:dump

Quicktime:

QuickTimeInstaller.exe /extract

silent install msi

How to set up a silent install of QuickTime through a batch script

WinVDIG:

WinVDIG download

Inno Setup Unpacker info

Inno Setup Unpacker download

unpack WinVDIG:

innounp.exe -x WinVDIG_101.exe

see install_script.iss

write copy file script, or create msi

Not use Java in environment PATH!

Oh, install 8-10 java VM and test java env ... it not work.

Use %APPDATA%SunJavaDeploymentdeployment.properties

deployment.javaws.jre.0.path=C:\App32\Java\jre6\bin\javaw.exe

get your java, set path at cmd, run JVM

JDK registry powershell

powershell gci 'hklm:SOFTWAREJavaSoftJava Development Kit'-rec^|gp^|select JavaHome

JRE registry powershell

powershell gci 'hklm:SOFTWAREJavaSoftJava Runtime Environment'-rec^|gp^|select JavaHome

Java Webstart registry powershell

powershell gci 'hklm:SOFTWAREJavaSoftJava Web Start'-rec^|gp^|select Home

JVM 64:

dir /A:D /B %ProgramFiles%Java

JVM 32:

dir /A:D /B %ProgramFiles(x86)%Java
Monday, October 3, 2022
 
praeus
 
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 

Browse Other Code Languages