Home > News Tips

Fix Createinstallmedia: Command Not Found [Sonoma/Ventura/Monterey]

Updated on Tuesday, December 3, 2024

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Picture the situation: You copied the exact command line for the Mac operating system you want to create a bootable USB installer with based on Apple's instruction page. However, after you execute it in Terminal, you receive an error stating:

sudo: /Applications/Install macOS High Sierra.app/Contents/Resources/createinstallmedia: command not found

createinstallmedia command not found error

If you repeat the steps, you'll likely fail again. This situation can be frustrating, but, fortunately, the solutions are straightforward.

In this article, we'll help you understand the reasons behind the error, createinstallmedia: command not found, and assist you in resolving it.

What cause 'createinstallmedia: command not found' in Terminal?

The message "createinstallmedia: command not found" can happen to any macOS version.

If you're creating a bootable USB installer of Sonoma, Ventura, Monterey, Big Sur, Catalina, Mojave, High Sierra, Sierra, Mavericks, Yosemite, or El Capitan, the following causes may result in "createinstallmedia: command not found":

  • The installer isn't in your Applications folder.
  • You downloaded the wrong installer or the installer is corrupted.
  • The syntax of your command is incorrect.
  • You're not logged in as an administrator. 

Nevertheless, if you're creating a bootable installer of Lion or Mountain Lion, which doesn't have the built-in ability to create a USB installer, you'll face the error indefinitely. To build a bootable drive for such an old OS, employ a tool like DiskMakerX.

Otherwise, keep reading to figure out the solutions!

 

Fix 'createinstallmedia: command not found' when creating macOS bootable installer

To fix the "command not found" error when creating a bootable macOS installation media, you need to take a look at the command line itself. Here's a breakdown of the two typical codes for bootable installer creation:

sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

sudo: This is a command used in macOS to run programs with the security privileges of the superuser, or root.

/Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia: This is the path to the createinstallmedia tool from the Applications folder, which is used to create a bootable macOS installer.

--volume /Volumes/MyVolume: This specifies the external volume where the macOS installation media will be created. In this case, it's targeting an external drive or a volume on an external drive named "MyVolume."

--applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app: This specifies the path to the OS X El Capitan installation application. It's only necessary for macOS Sierra and OS X versions.

Now that you understand the command, you should have a clearer picture of what may contribute to the error "createinstallmedia: command not found." Let's continue with the tips that ensure the command executes properly.

Fix 1: Make sure you're using an admin account

To run sudo, you must log in to your Mac as an administrator. If you're currently using a standard or guest user account that doesn't have administrator privileges, log out and log back in with the admin account.

Fix 2: Ensure the installer is in the Applications folder

Before executing the command, you must add the full installer to your Mac's Applications folder. That's because the createinstallmedia tool must be in the Applications folder, as specified in the code's path.

Ensure the macOS installer is in the Applications folder

If you downloaded the full installer in application format (.app), this won't be an issue since the app is automatically added to the Applications folder.

However, if you downloaded the DMG file, you need to double-click to open it, then open the pkg file inside and follow the instructions on the screen to extract it to your Applications folder.

Fix 3: Delete and redownload the right installer

It's also essential to have the correct installer containing the createinstallmedia command.

You can check the file size of the installer in your Applications folder. If it's only a few hundred bytes, it's certainly not the right one. Also, if the installer isn't named something similar to "Install macOS Mojave.app," it may not be the one you need.

In this case, you should delete the improper installer and redownload it from the Mac App Store, Terminal, or a reliable source. 

To download the full installer from Terminal, check out this guide: How to Update Mac from Terminal with Softwareupdate Command Line Tool?

You can also get the macOS DMG file from the sources below:

macOS Sonoma DMG 

macOS Ventura DMG

macOS Monterey DMG

macOS Catalina DMG

macOS Mojave DMG

macOS High Sierra DMG

Mac OS X El Capitan DMG

To check if your "Install macOS xxx" application has the createinstallmedia file, right-click on the installer, select "Show Package Contents," then navigate to Contents > Resources.

View the createinstallmedia file

Fix 4: Check the command syntax

The syntax of the command needs to be formed correctly for the OS version you're attempting to use. 

After copying the command string provided by Apple, you must replace MyVolume with your external drive's name. If the name contains a space, you need to use a backslash. For instance, if the name is Boot Media, you should reference it in Terminal as Boot\ Media.

This complicates things, so it's recommended to rename your external drive as MyVolume prior to running the command. This way, you can copy and paste the command without any modification.

Here's the correct command to use, provided that you have the proper installer in the Applications folder:

macOS Sonoma:sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

macOS Ventura:sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

macOS Monterey:sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

macOS Big Sur:sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

macOS Catalina:sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

macOS Mojave:sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

macOS High Sierra:sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

OS X El Capitan:sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

Share this guide to help others fix "createinstallmedia: command not found" when making bootable media for Sonoma, Ventura, Monterey, Big Sur, Catalina, Mojave, and earlier.