I'm in the process of installing ruby using macports. I typed the following command into terminal:
sudo port install ruby
Terminal responded by returning some lines that indicated the action was working, then it just stopped returning any new lines. I typed:
which ruby
and didnt get a response, so I closed the terminal window and consequently ended the processes.
I opened a new terminal window and re-typed the original install command and now I get the following message:
Waiting for lock on /opt/local/var/macports/registry/.registry.lock
How should I proceed from here? Should I just wait? If so, how long? Will terminal try to complete this action twice? How can I know if it's working?
A more appropriate thing to check, when you've seen no progress, is your system's activity.
On Mac OS, you could either open "Activity Monitor" and sort by CPU, or open a terminal and type top -o cpu
. Watch for some app showing consistent activity, especially something with "port" in the name.
To deal with the lock... odds are REALLY good it's stale since you cut it off at the knees by closing the terminal, so use sudo rm /opt/local/var/macports/registry/.registry.lock
to remove it and retry if you want.
I will recommend RVM for installing new versions of Ruby. It's really convenient. Before you jump into RVM read the "Installation" and "Rubygems" pages entirely, and after installing RVM type rvm notes
and follow the directions it spits out.
Finally, do not, under any circumstance, no matter how good an idea it seems to be, try to replace or upgrade the system version of Ruby installed by Apple. Apple installed it for their own use, and messing with it invites bad juju.
"Waiting for lock on /opt/local/var/macports/registry/.registry.lock
" means MacPorts is already running and doing things. You could check for any running "port" processes in Activity Monitor. Wait until these tasks are finished (or terminate them if you don't care that they don't finish) before trying to do other things with MacPorts.
ps -A | grep tclsh
if you can't find the running process so you can kill it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With