Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing XAMPP: Windows cannot find -n

I've been trying to install XAMPP for quite some time now, but every time, at the end of the installation, it says:

Windows cannot find "-n"

And after that, it says:

Problem running post-install step. Installation failed (php.exe) Perhaps you have to install Visual C++ 2008 package.

I have Visual C++ 2008 package and it still says this. What do I do now? I have Windows 10 64-bit for anyone wondering.

like image 826
chainboost Avatar asked Sep 06 '16 08:09

chainboost


People also ask

Why is XAMPP not installing on Windows 10?

The XAMPP installation is very straightforward, but Windows 10 sometimes may not allow the Apache server to run. Usually, it's because the World Wide Publishing Service is running on port 80 on your computer, which also happens to be the default TCP/IP port that Apaches uses on XAMPP.

How do I fix XAMPP installation?

That error could be shown if you already had an older version of XAMPP installed to the default folder (C:\xampp) and you try to install a new version in a specific custom folder. Just go to the Windows Control Panel, Add or Remove programs and uninstall the old installation of XAMPP.

Where is XAMPP installed on Windows?

Choose the root directory path to set up the htdocs folder for our applications. For example 'C:\xampp'. Click the Allow access button to allow the XAMPP modules from the Windows firewall. After the installation process, click the Finish button of the XAMPP Setup wizard.


4 Answers

I installed it in the root of my C: drive and it worked. Strange that previously I could just install it in my program files folder and that everything works...

like image 89
chainboost Avatar answered Oct 09 '22 08:10

chainboost


Had the same problem when I tried to install xampp in a folder with spaces in its name (some folder example)

It was solved after I reinstalled xampp in a folder that has no space in its name, E.g. c:/xampp

like image 45
riorio Avatar answered Oct 09 '22 06:10

riorio


Change your registry settings.

  1. Open Registry Editor by pressing Windows + R key combination, type in regedit and press Enter.
  2. If prompted by UAC, click on Yes to continue.
  3. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  4. In right-side pane, look for a EnableLUA and set the value to 0 and close Registry Editor.
  5. Restart your computer.

Source: windows10update.com

Then type in XAMPP shell:

setup_xampp.bat
like image 44
Jibril Avatar answered Oct 09 '22 06:10

Jibril


That error could be shown if you already had an older version of XAMPP installed to the default folder (C:\xampp) and you try to install a new version in a specific custom folder. Just go to the Windows Control Panel, Add or Remove programs and uninstall the old installation of XAMPP.

like image 4
José Andrés Avatar answered Oct 09 '22 07:10

José Andrés