When attempting to install the Pow server on my mac, everything appears to be going well. I run curl get.pow.cx | sh and receive confirmation that the package was installed correctly. However, when I cd ~/.pow and create the necessary symlink: ln -s /path/to/myapp I receive the following error: ln: ./myapp: File exists Upon navigating to http://myapp.dev I receive the standard Application not found error
Troubleshooting steps taken:
Uninstalled pow: curl get.pow.cx/uninstall.sh | sh
Removed the pow folder: rm -Rf ~/.pow
Removed the link: rm -Rf ~/.myapp
Restarted mac
Reinstalled Pow
Still no luck. Any suggestions?
If ln says the file exists, the symlink may already be there?
Once pow is installed, this is what I do:
Go to the pow dir: cd ~/.pow
Create a symlink to my app's directory: ln -s ~/dev/myapp myapp
Additionally, the ~/dev/myapp folder has a "public" directory inside of it. It's required.
Browse to http://myapp.dev
Maybe be explicit with your symlink name, as I was in #2?
Got this running by first uninstalling Pow: curl get.pow.cx/uninstall.sh | sh
Then reinstalling: curl get.pow.cx | sh
Going to the Pow directory: cd ~/.pow
Issuing the following command: rm ./myapp
Recreating the symlink: ln -s /path/to/maypp
Related
I might have a bit of a messed Docker installation on my Mac..
At first I installed Docker desktop but then running it I learned that as I'm on an older Mac I had to install VirtualBox so I did following these steps:
enable writing on the /usr/local/bin folder for user
sudo chown -R $(whoami) /usr/local/bin
install Docker-Machine
base=https://github.com/docker/machine/releases/download/v0.16.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine &&
chmod +x /usr/local/bin/docker-machine
install Xcode CLI..manually from dev account
Install Home Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Docker + wget ( Using Brew)
brew install docker
brew install wget
Install bash completion scripts
base=https://raw.githubusercontent.com/docker/machine/v0.16.0
for i in docker-machine-prompt.bash docker-machine-wrapper.bash docker-machine.bash
do
sudo wget "$base/contrib/completion/bash/${i}" -P /etc/bash_completion.d
done
enable the docker-machine shell prompt
echo 'PS1='[\u#\h \W$(__docker_machine_ps1)]\$ '' >> ~/.bashrc
Install VirtualBox, ExtensionPack and SDK: https://www.virtualbox.org/wiki/Downloads
I now installed docker-compose (docker-compose version 1.29.2, build unknown) with home-brew but when running docker-compose up I get the following error:
docker.credentials.errors.InitializationError: docker-credential-desktop not installed or not available in PATH
which docker prints /usr/local/bin/docker.
Brew installations are in /usr/local/Cellar/docker/20.10.6 and /usr/local/Cellar/docker-compose/1.29.2.
As I see there is also a home-brew for docker-machine should I install docker-machine via home-brew instead?
What can I check to make sure that I use the docker installations from home-brew and wipe/correct the installations made from steps above?
Check your ~/.docker/config.json and replace "credsStore" by "credStore"
{
"stackOrchestrator" : "swarm",
"experimental" : "disabled",
"credStore" : "desktop"
}
just in ~/.docker/config.json change credsStore to credStore
After a long googling I found out that the problem is with the config.json file.
The "credsStore" : "docker-credential-desktop" is wrong one in :
{
"credsStore" : "docker-credential-desktop",
"stackOrchestrator" : "swarm",
"experimental" : "disabled"
}
changed the "credsStore" key value to "desktop" and compose now works as expected. Some pointed out that credsDstore typo was the problem and fixed it with credDstore, but in my case the value was the problem, it works both with "credsStore" : "desktop" and "credStore" : "desktop".
Hope it'll help others starting out with Docker.
Cheers.
Since you're on a Mac, you could use docker-credential-osxkeychain instead.
Install docker-credential-helper.
brew install docker-credential-helper
Verify docker-credential-osxkeychain is available.
$ docker-credential-osxkeychain version
0.6.4
Set credsStore to osxkeychain in ~/.docker/config.json
{
"auths": {
"https://index.docker.io/v1/": {}
},
"credsStore": "osxkeychain",
"experimental": "enabled",
"stackOrchestrator": "swarm"
}
Login to Docker Hub.
$ docker login -u $USER
Password:
Login Succeeded
I ran into a similar issue using wsl2 on windows 10 while trying to locally invoke an aws lambda function. I was getting docker.credentials.errors.InitializationError: docker-credential-desktop not installed or not available in PATH when running sam build --use-container. Running which docker-credential-desktop showed no results
Upon further inspection I found that docker-credential-desktop.exe was in PATH however. After a quick google, it seems like enabling the wsl2 backend in Docker Desktop for Windows 10 symlinks wsl/docker-desktop/cli-tools/usr/bin/docker-credentials-desktop.exe to /usr/bin/docker-credential-desktop.exe. To fix this I simply removed the symlink and created a new one without .exe
To check the link and remove it:
user#device:~$ ls -l /usr/bin/docker-credential-desktop.exe
lrwxrwxrwx 1 root root 67 Jan 5 23:15 /usr/bin/docker-credential-desktop.exe -> /wsl/docker-desktop/cli-tools/usr/bin/docker-credential-desktop.exe
user#device:~$ sudo rm /usr/bin/docker-credential-desktop.exe
To create a new one without .exe and check it worked:
user#device:~$ sudo ln -s /wsl/docker-desktop/cli-tools/usr/bin/docker-credential-desktop.exe /usr/bin/docker-credential-desktop
user#device:~$ ls -l /usr/bin/docker-credential-desktop
lrwxrwxrwx 1 root root 67 Jan 12 14:22 /usr/bin/docker-credential-desktop -> /wsl/docker-desktop/cli-tools/usr/bin/docker-credential-desktop.exe
After that I sourced .bashrc to update PATH and the problem was resolved. I verified this with which docker-credential-desktop and it now shows the location specified in the symlink above.
If your are on WSL, try desktop.exe, instead of desktop. Because you will find that the program in /usr/bin/ is docker-credential-desktop.exe.
{
"credsStore": "desktop.exe"
}
I have a user that has no home dir. In other words, $HOME is not defined.
It is a Jenkins user that runs a job. It does not have sudo access.
When I try to install rvm locally, it fails:
curl -sSL https://get.rvm.io > install_ruby.sh
bash install_ruby.sh stable
mkdir: cannot create directory ‘/.rvm’: Permission denied
So I try to trick it into thinking the HOME dir is the WORKSPACE dir:
export HOME=$WORKSPACE
curl -sSL https://get.rvm.io > install_ruby.sh
bash install_ruby.sh stable
It looks you are one of the happy *space* users (in home dir name),
RVM is not yet fully ready for it, use this trick to fix it:
sudo mkdir -p /ope.rvm
sudo chown -R "ope:" /ope.rvm
echo "export rvm_path=/ope.rvm" >> "/mnt/ope/ws/workspace/Hiptest Jenkins Integration Setup/.rvmrc"
and start installing again.
Unfortunately, this user does not have sudo access?
How can I install RVM for this particular job?
I ended up using rbenv. It worked out of the box.
Following these instructions:
Ubuntu installation
on Ubuntu Server 12.04. I've set my https_proxy in /etc/environment. Next I do:
sudo wget https://get.docker.com/
and the response is "cannot verify get.docker.com's certificate... to connect insecurely use '--no-check-certificate'.
So I do:
sudo wget --no-check-certificate https://get.docker.com/
I'm still getting a message complaining "cannot verify get.docker.com's certificate" and wget downloads the index.html file from get.docker.com rather than an installation package.
I am very new to Linux - please can anyone tell me what I'm doing wrong?
You are doing this:
sudo wget https://get.docker.com/
The instructions to which you linked tell you to do this:
wget -qO- https://get.docker.com/ | sh
That retrieves the shell script and pipes it to the shell for execution. For the record I am morally opposed to this sort of installation, but that's what you need to do to follow those instructions.
I recently had to destroy and recreate my Vagrant instance. Now I can't run any rails command as it says Rails is not installed. When I did
Vagrant Up
I got the following error
default: /tmp/vagrant-shell: line 1: /home/vagrant/.rvm/scripts/rvm: No such file or directory
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
My Provision.sh file contains the following:
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main " | sudo tee -a /etc/apt/sources.list.d/pgdg.list
sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get remove postgresql-client-9.1 postgresql-client-common postgresql-client postgresql-common -y
sudo apt-get install postgresql-9.3 postgresql-client-9.3 libpq-dev curl git build-essential libxslt-dev libxml2-dev -y
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
curl -sSL https://get.rvm.io | bash -s stable --ruby
cat << EOF | sudo tee -a /home/vagrant/.bashrc
cd /vagrant
EOF
echo '# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust' | sudo tee /etc/postgresql/9.3/main/pg_hba.conf
echo 'machine api.heroku.com
login *****
password ****
machine code.heroku.com
login *****
password *****
' | tee /home/vagrant/.netrc
echo 'ssh-rsa ***** vagrant#precise32
' | tee /home/vagrant/.ssh/id_*****.pub
chmod 0600 /home/vagrant/.netrc
sudo -u postgres psql -c "create user ***** createdb createuser password '*****';"
sudo /etc/init.d/postgresql restart
I have seen some answers (not specific to Vagrant) suggesting that I must have installed rvm using sudo or as root and need to remove it and then get rvm again. I have tried to do that butI'm not sure how it applies to a vagrant box and at any rate I must have done it wrong as it hasn't worked.
Is there something I need to correct/add to my provision.sh file or to my Vagrantfile?
Vagrant runs the provisioning file as root, so you would have indeed installed rvm as root unless you specified otherwise*. This was quite confusing for me as well (also a newbie), I would install things during provisioning and they would "disappear". In fact, they were all being installed / set as root.
*Or, you manually installed rvm when ssh'd into the machine, which I'll touch on more below.
You can switch your user using su -c "source /home/vagrant/myapp/vagrant/user-config.sh" vagrant
What goes in the "" is any command you want to execute. In this case, we're switching to a separate shell file user-config.sh that contains all the commands that should not be run as root, such as installing RVM.
I also sense somewhat of a conceptual misunderstanding. Each time you do vagrant destroy your entire virtual machine is destroyed, hard drives and all. The next time you do vagrant up, everything is rebuilt from scratch. If you had ssh'd in and installed things, they'll no longer be there.
This means that all of your install and config goes into the provisioning file, and you shouldn't be installing things manually after the fact. You should be able to vagrant destroy any time you want.
Take a read through https://coderwall.com/p/uzkokw/configure-the-vagrant-login-user-during-provisioning-using-the-shell-provider once more, I'm hoping it makes more sense this time around.
May be this link helps you to install rvm using Vagrant.
RVM_Vagrant
I have install iTMSTransporter and try to run it from it is destination directory in order to fetch the metadata from iTunes Connect .
I am in lookup mode and used following command:
iTMSTransporter -m lookupMetadata -u uid -p password -vendor_id SnapLion000011 - destination /Users/Snaplion4/Desktop
and got following error :
-bash: iTMSTransporter: command not found
On my Mac the installer installed the binaries here. /usr/local/itms/bin
I cd into that folder and run
$ ./iTMSTransporter -m verify -f .....
You might not be in the same folder with iTMSTransporter. If you are in the same folder try adding ./ at the beginning of the command.
BTW you should hide your password. I can't believe superwoman has that much downloads.