i have installed composer in ubuntu, and also the Cli, but if i type kirby install --kit starterkit
it says me âCommand Kirby not Foundâ , thats very confused do you have any Ideas?
Have you added the composer bin path to your $PATH?
i dont really understand what it means
Run the following in your terminal:
export PATH="$HOME/.composer/vendor/bin:$PATH"
If the CLI works, the next step is to add this line to your ~/.profile
file so that it is run for every terminal you open in the future.
is ~/.profile a Folder?
Edit:
i have Found it, its in the etc folder, and this is how the file looks, who i have to paste the line?
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
No, itâs neither a folder nor is it in /etc
.
~
means âhome directoryâ and .profile
is the name of the file there. If it doesnât exist, create it.
But please donât do the second step after the first one. First run the command in your terminal as I wrote above.
i have run the command in my Terminal First
And does the CLI work after you run it?
no, it doesent works
Then it also wonât help to add the command to ~/.profile
.
Next step is to verify that the CLI has actually been installed correctly. Check if thereâs something inside ~/.composer/vendor/bin
. If that folder does not exist at all, then install the CLI first.
in my Home Folder i just have a Folder called vendor and in there are the CLI Files, i already installed the CLI
Thatâs strange. The vendor
directory should be inside a .composer
directory. Please try moving it and then continue with the two steps from above.
can i try to create a .composer Folder?
Yes, you create that folder and move the vendor
folder inside it.
okay its done, did i have to run the command again?
export PATH="$HOME/.composer/vendor/bin:$PATH"
Edit i have run the line again, and if i run
kirby install mysite --kit plainkit
i got this Error Message
So now i have found a .profile file, it looks so
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
The ~/.profile
file you found is the correct one. You can add the export command at the end (in a new line, of course).
Regarding the error message: At least it shows that the CLI is now correctly installed. I donât know where that error message comes from however.
So right?
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export PATH="$HOME/.composer/vendor/bin:$PATH"
Yes. If you open a new terminal, the kirby
command should work.
i have added it, but it shows again âCommand Kirby not Foundâ . Thats so Confused