Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mstdmstd's avatar

Why I got "No input file specified." message in my Homestead installation?

I have installed virtualbox and vagrant under my ubuntu 20

I created file /home/master/Homestead/Homestead.yaml with 2 hosts (I need mysql and mongodb):

ip: "192.168.56.56"
memory: 2048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /_wwwroot/lar/MS/MS_Banners
      to: /home/vagrant/apps/MS_Banners


    - map: /_wwwroot/lar/MngProducts
      to: /home/vagrant/apps/MngProducts

sites:
    - map: local-ms-banners.test
      to: /_wwwroot/lar/MS/MS_Banners/public
      php: "8.0"


    - map: local-mng-products.test
      to: /_wwwroot/lar/MngProducts/public
      php: "8.1"

databases:
    - MS_Banners

features:
    - mysql: true
    - mongodb: true
    - mariadb: false
    - postgresql: false
    - ohmyzsh: false
    - webdriver: false

services:
    - enabled:
          - "mysql"

Running command :

vagrant up --provision

I got long output with some red lines :

Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '12.2.0' is up to date...
==> homestead: Running provisioner: file...
    homestead: /home/master/Homestead/aliases => /tmp/bash_aliases
==> homestead: Running provisioner: handle_aliases (shell)...
    homestead: Running: inline script
==> homestead: Running provisioner: setting authorize key (shell)...
    homestead: Running: inline script
==> homestead: Running provisioner: setting authorize permissions for id_rsa (shell)...
    homestead: Running: inline script
==> homestead: Running provisioner: mk_features (shell)...
    homestead: Running: inline script
==> homestead: Running provisioner: own_features (shell)...
    homestead: Running: inline script
==> homestead: Running provisioner: apt_update (shell)...
    homestead: Running: inline script
    homestead: Ign:1 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease
    homestead: Hit:2 https://deb.nodesource.com/node_14.x focal InRelease
    homestead: Hit:3 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 Release
    homestead: Get:4 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
    homestead: Hit:6 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal InRelease
    homestead: Hit:7 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
    homestead: Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
    homestead: Hit:9 http://us.archive.ubuntu.com/ubuntu focal InRelease
    homestead: Hit:10 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
    homestead: Hit:11 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
    homestead: Hit:12 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
    homestead: Fetched 57.7 kB in 2s (29.4 kB/s)
    homestead: Reading package lists...
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
    homestead: Invalid feature: mysql
==> homestead: Running provisioner: shell...
    homestead: Running: script: Installing mongodb
    homestead: MongoDB already installed.
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
    homestead: Ignoring feature: mariadb because it is set to false
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
    homestead: Ignoring feature: postgresql because it is set to false
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
    homestead: Ignoring feature: ohmyzsh because it is set to false
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
    homestead: Ignoring feature: webdriver because it is set to false
==> homestead: Running provisioner: shell...
    homestead: Running: script: Installing php8.0
    homestead: PHP 8.0 already installed.
==> homestead: Running provisioner: shell...
    homestead: Running: script: Installing php8.1
    homestead: PHP 8.1 already installed.
==> homestead: Running provisioner: enable mysql (shell)...
    homestead: Running: inline script
    // 2 LINES BELOW ARE RED
    homestead: Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
    homestead: Executing: /lib/systemd/systemd-sysv-install enable mysql
==> homestead: Running provisioner: start mysql (shell)...
    homestead: Running: inline script
==> homestead: Running provisioner: shell...
    homestead: Running: /tmp/vagrant-shell20221220-41221-1acw2t2.sh
==> homestead: Running provisioner: shell...
    homestead: Running: /tmp/vagrant-shell20221220-41221-w2xeim.sh
==> homestead: Running provisioner: shell...
    homestead: Running: script: Creating Certificate: local-ms-banners.test
==> homestead: Running provisioner: shell...
    homestead: Running: script: Creating Site: local-ms-banners.test
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
==> homestead: Running provisioner: shell...
    homestead: Running: /tmp/vagrant-shell20221220-41221-1aeuibw.sh
==> homestead: Running provisioner: shell...
    homestead: Running: script: Checking for old Schedule
==> homestead: Running provisioner: shell...
    homestead: Running: script: Creating Certificate: local-mng-products.test
==> homestead: Running provisioner: shell...
    homestead: Running: script: Creating Site: local-mng-products.test
==> homestead: Running provisioner: shell...
    homestead: Running: inline script
==> homestead: Running provisioner: shell...
    homestead: Running: /tmp/vagrant-shell20221220-41221-23cr1x.sh
==> homestead: Running provisioner: shell...
    homestead: Running: script: Checking for old Schedule
==> homestead: Running provisioner: shell...
    homestead: Running: script: Clear Variables
==> homestead: Running provisioner: shell...
    homestead: Running: script: Restarting Cron
==> homestead: Running provisioner: shell...
    homestead: Running: script: Restart Webserver
==> homestead: Running provisioner: shell...
    homestead: Running: script: Creating MySQL / MariaDB Database: MS_Banners
    homestead: We didn't find MariaDB ($mariadb), skipping $DB creation
==> homestead: Running provisioner: shell...
    homestead: Running: script: Creating Mongo Database: MS_Banners
    homestead: MongoDB shell version v4.4.18
    homestead: connecting to: mongodb://127.0.0.1:27017/MS_Banners?compressors=disabled&gssapiServiceName=mongodb
    homestead: Implicit session: session { "id" : UUID("305d08ae-ce7e-4439-a965-72163793dcfa") }
    homestead: MongoDB server version: 4.4.18
    homestead: WriteResult({ "nInserted" : 1 })
==> homestead: Running provisioner: shell...
    homestead: Running: script: Update Composer
    // THE LINE BELOW IS RED
    homestead: You are already using the latest available Composer version 2.5.0 (stable channel).
==> homestead: Running provisioner: shell...
    homestead: Running: /tmp/vagrant-shell20221220-41221-plsvhs.sh
==> homestead: Running provisioner: shell...
    homestead: Running: script: Update motd
==> homestead: Running provisioner: Run after.sh (shell)...
    homestead: Running: /tmp/vagrant-shell20221220-41221-1vqbufq.sh

But running both hostings in browser I got error message only :

No input file specified.

In my I added 2 lines at the end of file /etc/hosts:

127.0.0.1	localhost
127.0.1.1	master-at-home

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


127.0.1.5 	local-bi-currencies.com
...

192.168.56.56  local-mng-products.test
192.168.56.56   local-ms-banners.test

I have :

uname -a
Linux master-at-home 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


master@master-at-home:~/Homestead$ apt show  virtualbox
Package: virtualbox
Version: 6.1.38-dfsg-3~ubuntu1.20.04.1
Priority: optional
Section: multiverse/misc
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Virtualbox Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 112 MB
Depends: adduser, iproute2, procps, virtualbox-dkms (>= 6.1.38-dfsg-3~ubuntu1.20.04.1) | virtualbox-source (>= 6.1.38-dfsg-3~ubuntu1.20.04.1) | virtualbox-modules, python3 (<< 3.9), python3 (>= 3.8~), python3.8, python3:any, libc6 (>= 2.29), libcurl3-gnutls (>= 7.16.2), libdevmapper1.02.1 (>= 2:1.02.97), libgcc-s1 (>= 3.0), libgl1, libgsoap-2.8.91, liblzf1 (>= 1.5), libopus0 (>= 1.1), libpng16-16 (>= 1.6.2-1), libpython3.8 (>= 3.8.2), libsdl1.2debian (>= 1.2.11), libssl1.1 (>= 1.1.1), libstdc++6 (>= 5.2), libvncserver1 (>= 0.9.10), libvpx6 (>= 1.6.0), libx11-6, libxcursor1 (>> 1.1.2), libxml2 (>= 2.7.4), libxt6, zlib1g (>= 1:1.1.4)
Recommends: virtualbox-qt (= 6.1.38-dfsg-3~ubuntu1.20.04.1), libqt5core5a (>= 5.12.2), libqt5gui5 (>= 5.0.2) | libqt5gui5-gles (>= 5.0.2), libqt5opengl5 (>= 5.0.2), libqt5widgets5 (>= 5.0.2), libxcb1, libxext6
Suggests: vde2, virtualbox-guest-additions-iso
Conflicts: virtualbox-2.0, virtualbox-2.1, virtualbox-2.2, virtualbox-3.0, virtualbox-3.1, virtualbox-3.2, virtualbox-4.0, virtualbox-4.1, virtualbox-4.2, virtualbox-4.3, virtualbox-5.0, virtualbox-5.1, virtualbox-5.2, virtualbox-6.0, virtualbox-6.1
Homepage: https://www.virtualbox.org
Download-Size: 21.6 MB
APT-Manual-Installed: yes
APT-Sources: http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages
Description: x86 virtualization solution - base binaries
 VirtualBox is a free x86 virtualization solution allowing a wide range
 of x86 operating systems such as Windows, DOS, BSD or Linux to run on a
 Linux system.
 .
 This package provides the binaries for VirtualBox. Either the virtualbox-dkms
 or the virtualbox-source package is also required in order to compile the
 kernel modules needed for virtualbox. A graphical user interface for
 VirtualBox is provided by the package virtualbox-qt.

N: There is 1 additional record. Please use the '-a' switch to see it
master@master-at-home:~/Homestead$ apt show  vagrant
Package: vagrant
Version: 2.2.6+dfsg-2ubuntu3
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Ruby Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 3,178 kB
Depends: libarchive-tools, curl, openssh-client, rsync, ruby, ruby-bcrypt-pbkdf (>= 1.0.0), ruby-childprocess (>= 0.6.0), ruby-ed25519 (>= 1.2.4), ruby-erubis (>= 2.7.0), ruby-i18n (>= 1.1.1), ruby-listen (>= 3.1.5), ruby-log4r (>= 1.1.9), ruby-net-scp (>= 1.2.0), ruby-net-sftp (>= 2.1), ruby-net-ssh (>= 5.1.0), ruby-rest-client (>= 1.6.0), ruby-vagrant-cloud (>= 2.0.3), ruby-zip (>= 1.2.2)
Recommends: vagrant-libvirt
Suggests: virtualbox (>= 4.0)
Breaks: virtualbox (>= 6.2)
Homepage: https://www.vagrantup.com
Ruby-Versions: all
Download-Size: 425 kB
APT-Manual-Installed: yes
APT-Sources: http://ua.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
Description: Tool for building and distributing virtualized development environments
 This package provides the tools to create and configure lightweight,
 reproducible, and portable virtual environments.
 .
 Vagrant uses Oracle’s VirtualBox to create its virtual machines and then
 uses Chef or Puppet to provision them.

N: There is 1 additional record. Please use the '-a' switch to see it

What can be reason of this error? I do not see any config errors...

I found this https://stackoverflow.com/questions/24274387/using-laravel-homestead-no-input-file-specified branch and try some hints from it :

  1. I run all command as “master” (common) user, not root

    vagrant up --provision

But I still got error message :

No input file specified.
  1. On command :

    homestead up --provision

I got

homestead: command not found

I found this https://laracasts.com/discuss/channels/general-discussion/bash-homestead-command-not-found branch

With advice to run command :

composer global require "laravel/homestead=~2.0"

Not sure if I really neeed to run this command ?

I prefer to have Homestead installed globally, what I did with commands from docs at page https://laravel.com/docs/9.x/homestead starting with command :

git clone https://github.com/laravel/homestead.git ~/Homestead

How this error can be fixed? Are there some additive logs, degugging options to find reason of this error ?

Thanks!

0 likes
6 replies
mstdmstd's avatar

I modified my /home/master/Homestead/Homestead.yaml file:

folders:
    - map: ~/code
      to: /home/vagrant/code

    - map: /_wwwroot/lar/MS/MS_Banners
      to: /home/vagrant/apps/MS_Banners


sites:
    - map: homestead.test
      to: /home/vagrant/code

    - map: local-ms-banners.test
      to: /_wwwroot/lar/MS/MS_Banners/public

In the bash I can open root directory of my project :

vagrant@homestead:~$ cd apps
vagrant@homestead:~/apps$ cd  MS_Banners
vagrant@homestead:~/apps/MS_Banners$ ls -la
total 1236
...

and see all files of my project.

but running command :

vagrant up --provision

I can open php file under homestead.test url ok. But with url local-ms-banners.test I still got “No input file specified.” error...

In my OS :

 echo $PATH;
/home/master/.composer/vendor/bin:/home/master/.composer/vendor/bin:/home/master/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/master/.config/composer/vendor/bin

?

newbie360's avatar

@mstdmstd

here is example

---
ip: "192.168.56.56"
memory: 16384
cpus: 2
provider: virtualbox

authorize: c:/Users/xxxxxx/.ssh/id_rsa.pub

keys:
    - c:/Users/xxxxxx/.ssh/id_rsa

folders:
    - map: v:/web/code/projects/aaa
      to: /home/vagrant/code/projects/aaa

    - map: v:/web/code/projects/bbb
      to: /home/vagrant/code/projects/bbb

    - map: v:/web/code/projects/ccc
      to: /home/vagrant/code/projects/ccc

    - map: v:/web/code/projects/ddd
      to: /home/vagrant/code/projects/ddd

sites:
    - map: aaa.test
      to: /home/vagrant/code/projects/aaa/public
      php: "7.4"

    - map: bbb.test
      to: /home/vagrant/code/projects/bbb/public
      php: "7.4"

    - map: ccc.test
      to: /home/vagrant/code/projects/ccc/public
      php: "8.0"

    - map: ddd.test
      to: /home/vagrant/code/projects/ddd/public
      php: "8.1"

databases:
    - homestead
    - aaa
    - bbb
    - ccc
    - ddd

features:
    - mysql: true
    - mariadb: false
    - postgresql: false
    - ohmyzsh: false
    - webdriver: false
    - meilisearch: true

services:
    - enabled:
          - "mysql"
#    - disabled:
#        - "postgresql@11-main"

ports:
    - send: 33060
      to: 3306
#    - send: 4040
#      to: 4040
#    - send: 54320 # PostgreSQL
#      to: 5432
#    - send: 8025 # Mailhog
#      to: 8025
#    - send: 9600
#      to: 9600
#    - send: 27017
#      to: 27017

so in my main computer my projects folders look like this

v:\web\code\projects\aaa
v:\web\code\projects\bbb
v:\web\code\projects\ccc
v:\web\code\projects\ddd

the important notes, when you want to create a new project, you need temp add this,

folders:
    - map: v:/web/code/projects
      to: /home/vagrant/code/projects

and then run vagrant ssh, go to the projects folder create your Laravel project

after your project created, append the project name in the above code, also create the site block and database

folders:
    - map: v:/web/code/projects/new
      to: /home/vagrant/code/projects/new

sites:
    - map: new.test
      to: /home/vagrant/code/projects/new/public
      php: "8.1"

databases:
    - new

tips: you can edit aliases file, after SSH to Homestead, just type aaa can easy go to the project folder

(make sure the alias in unique in the aliases file, make sense ?)

alias tinker="php artisan tinker"
alias mfs="php artisan migrate:fresh --seed"
alias aaa="cd code/projects/aaa"
alias bbb="cd code/projects/bbb"
alias ccc="cd code/projects/ccc"
alias ddd="cd code/projects/ddd"
alias new="cd code/projects/new"

run command to take the new effect

vagrant reload --provision

all done !!!!

1 like
newbie360's avatar

@mstdmstd in my local dev, i was use HeidiSQL to connect Homestead MySQL, so i need map the port

if you follow Laravel Homestead doc, actually it is very easy, i'm confuse why u get all the errors

mstdmstd's avatar

At this subbranch https://stackoverflow.com/questions/24274387/using-laravel-homestead-no-input-file-specified/29962065#29962065 I found a hint to use commands :

homestead destroy
homestead up

But trying to follow it I got unexpected results:

master@master-at-home:~/Homestead$ homestead destroy

                                     
  Command "destroy" is not defined.  
                                     

master@master-at-home:~/Homestead$ homestead -h
Description:
  List commands

Usage:
  list [options] [--] [<namespace>]

Arguments:
  namespace             The namespace name

Options:
      --raw             To output raw command list
      --format=FORMAT   The output format (txt, xml, json, or md) [default: "txt"]
      --short           To skip describing commands' arguments
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  The list command lists all commands:
  
    /home/master/.config/composer/vendor/bin/homestead list
  
  You can also display the commands for a specific namespace:
  
    /home/master/.config/composer/vendor/bin/homestead list test
  
  You can also output the information in other formats by using the --format option:
  
    /home/master/.config/composer/vendor/bin/homestead list --format=xml
  
  It's also possible to get raw list of commands (useful for embedding command runner):
  
    /home/master/.config/composer/vendor/bin/homestead list --raw
master@master-at-home:~/Homestead$ homestead up --provision

                                
  Command "up" is not defined.  
                                

master@master-at-home:~/Homestead$ homestead --provision

                                            
  The "--provision" option does not exist.  
                                            

list [--raw] [--format FORMAT] [--short] [--] [<namespace>]

master@master-at-home:~/Homestead$ homestead provision

                                       
  Command "provision" is not defined.  
                                       

master@master-at-home:~/Homestead$ whereis homestead 
homestead: /home/master/.config/composer/vendor/bin/homestead

master@master-at-home:~/Homestead$ homestead -v
Laravel Homestead 13.3.2

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  completion            Dump the shell completion script
  help                  Display help for a command
  list                  List commands
  make                  Install Homestead into the current project
 wsl
  wsl:apply-features    Configure features in WSL from Homestead configuration
  wsl:create-databases  Create Databases in WSL from Homestead configuration
  wsl:create-sites      Create Sites in WSL from Homestead configuration

Have Laravel Homestead 13.3.2 different commands ? Or do I have some invalid Homestead installed ?

mstdmstd's avatar

I removed from folders “/apps” path

  • map: /_wwwroot/lar/MS/MS_Banners to: /home/vagrant/apps/MS_Banners

with “code” subdirectory:

to: /home/vagrant/code/MS_Banners

and removed 2nd item :

to: /home/vagrant/apps/MngProducts

but when I enter box with command :

vagrant ssh

I still see directory “~/apps" with 2 subdirectories “MngProducts” and “MS_Banners” I have run commands

vagrant reload --provision
...
vagrant up --provision

many times, but looks like there were not applied. What have I do to apply my config changes?

Please or to participate in this conversation.