p4 command not found - macos

I'm trying to use p4 commands in my batch files on Mac like p4 login etc.
I keep getting the error "-bash p4: command not found".
I followed the top 7 steps here and got the same error:
http://www.endlesslycurious.com/2008/11/11/configuring-p4-command-line-client-on-mac-os-x/
I couldn't find anything else useful when searching.
Has anyone else encountered a similar issue and resolved it?

Just drop the "p4" executable in /usr/local/bin or even /usr/bin if you prefer. ;-)

How-To steps:
(1) Download p4 file for macOS from:
https://www.perforce.com/downloads/helix-command-line-client-p4
(2) Copy the item to any local folder under any custom folder. For ex: '/Users//perforce'
(3) Run the following commands in terminal.
chmod +x /Users/<yourname>/perforce/p4
export PATH=/Users/<yourname>/perforce:$PATH
(4) Now run 'p4' in terminal.
This should not fail!

To add to the existing answers, on my macOS Mojave, downloading Perforce 2019.1/1796703 for OSX 10.10+ using Safari gives me a p4.dms file.
You must rename it to p4 first before using it. Any attempt to unarchive the .dms file will fail. It is not a valid DMS archive.

Related

Cocoapods sudo-less installation

Hi I follow this guideline for sudo-less installation https://guides.cocoapods.org/using/getting-started.html and I stuck on /Users/eloy/.gem/ruby/2.0.0/bin/pod install
Terminal says [!] No Podfile found in the project directory.
Command gem which cocoapods correctly shows path to cocoapds so I guess installation succeed. I tried changing paths in .profile file but it's not a problem. Please give me some ideas.
I followed the same guidelines for sudo-less installation, and I had the same results and issues. I'm very new to all of this, so take this answer with a healthy dose of skepticism unless someone more experienced confirms it.
After some poking around on google, I stumbled upon this article.
Following these instructions resolved my issues, so I hope they help you as well.
EDIT: This temporarily adds CocoaPods to your path. I am using a Mac that uses a zsh shell for the terminal.app. I'm not sure what shell you have, but for Macs you'll need to edit your .zshrc file (or create one because you will not have a .zshrc file on your Mac if you have not created one yourself already). I found this answer that shows how to create the .zshrc file through the terminal. You can find the .zshrc file you have created by navigating to Macintosh HD > Users > [INSERT_USERNAME] and pressing "cmd + shift + ." to show hidden files. Scroll down until you see the .zshrc file, open it with a text editor, and input the code from the first page I linked. Save it and exit. Now you should always have CocoaPods in your path every time you open up the terminal!
Probably an easier way to do this, but it worked for me.

gfortran: error: libgfortran.spec: No such file or directory

I am attempting to install and run gfortran-8 on macOS with the following makefile. I installed it from http://hpc.sourceforge.net/ (8.3 version). I keep getting this error:
gfortran: error: libgfortran.spec: No such file or directory
I know libhfortran.spec is located in /usr/local/Cellar/gcc#8/8.4.0/lib/gcc/8/libgfortran.spec. I have added it to my etc/paths and my .bash_profile. I have also uninstalled gfortran and reinstalled it. Anyone have a clue on what I might be missing? I am attaching my makefile below.
Makefile:
https://drive.google.com/open?id=1Y_Zo2dSYI32dQpwMtdUy5rWB8avDHXor
Bellhop Macintosh Installation
Note: I know gfortran is now part of gcc but newest at version still only works with older gfotran compilers. If you have Catalina as well, don’t worry this will still work on Mojave as well as on Catalina. I had tested it.
Go to this link.
Download
Install the downloaded gfortran-8.2-Mojave.dmg, this compiler is being used by the at to create binaries for your MacOS.
Go to the path where you extracted at folder. (In Mac you don’t need windows binary, you need to compile using gfotran compiler.)
Execute the following commands in the at folder.
Once you installed. Close all the terminals.
Open new terminal. Do as follows:
In your terminal, type this:
echo $PATH
Above command give you current path in your zsh file, If you have one.
Add bellhop to your zsh file. You can use these commands in terminal:
cd
nano .zsh
Please note that there is no Bellhop in the path right now, so we are going to add that by adding the following line in the .zsh file, Copy and paste below list (change the path accordingly)
export PATH=your_local_macOS_path/at:your_local_macOS_path/at/Bellhop:$PATH$
For me, it was:
export PATH=/Users/jaypatel/Downloads/at:/Users/jaypatel/Downloads/at/Bellhop:$PATH$
Refer the screenshot below for more details.
Once you’re done, press ctrl+X and it will ask you do you want to save your file, type Y and press enter and it will save the path successfully.
And now source ~/.zsh to your terminal using this command :
source ~/.zsh
echo $PATH
This means your acoustic toolbox and bellhop.exe are in path’s now.
And now source ~/.zsh to your terminal using this command : source ~/.zsh
And Voila, Your Bellhop is successfully installed.
Reference :
You can find more details here.

Error while trying to run Pharo for the first time

I am trying to run Pharo on my system (Ubuntu 17.10 64bit).I followed the exact procedure as given in the book Pharo By Example.
I Went into the Pharo6.1-64 directory and ran the following command in the terminal
./pharo shared/pharo6.1-64.image
I expected this to open the Pharo window where I can write code but instead saw this error in the Terminal.
./pharo: line32: /home/user/pharo6.1-64/vm/pharo: No such file or directory.
Do I need to download any additional files ?
I downloaded the zip from here and it said just extract and run.
It looks like there is something wrong with the file you downloaded. It does not seem to contain a vm. For now, try the other method mentioned in the book:
wget -O- get.pharo.org/50+vm | bash
Copy the pharo.image and pharo.changes to the directory containing the pharo executable and from terminal run the command
Pharo_executable path_to_Pharo_image

How do I use this basic shell script in Mac OS X Terminal?

I'd like to download videos from Harvard's CS109 course. I found this page that describes the process. I'm on Mac OS X El Capitan and I've successfully installed rtmpdump. I'm not sure how to use this script quoted from the page linked to above:
./get.sh hq-urls.txt # for high quality versions
What does that line of code do/mean? Do I have to insert a URL into part of the code? When I copy and paste
./get.sh hq-urls.txt
into the terminal, I get the message: "-bash: ./get.sh: No such file or directory".
It seems like I should copy and paste some url into that code or use some of the other files listed on that github page somehow.
You need to download the repository from github. You can do so by typing the following:
git clone https://github.com/vaishaks/cs109-dl-videos.git
This will download the repository into your current directory. If you have just opened the Terminal, this will be /Users/yourname.
Now you need to cd into this directory. You can do so by typing the following:
cd cs109-dl-videos
Now you can type the command, as it was posted on the site:
./get.sh hq-urls.txt

Cannot find Mercurial global configuration file on osx

I am new to Bitbucket. I am trying to setup my computer to access Bitbucket using the following instructions. On Step 5, I am told to add ssh = ssh -C to file ~/.hgrc. I can't seem to find the file. Has anyone done this step successfully? How do I go about it?
It seems you don't have Mercurial installed at all. Step 3 of Bitbucket tutorial gives detailed description how to install it from MacPorts.
Once you have Mercurial installed just create .hgrc manually and add your configuration.
If you have not this file - create it. But you, maybe, just can't see it - dotted files are hidden. Anyway read hg help config
I had a problem with this too, but managed to find the .hgrc file. First get all hidden files visible by downloading this software http://invisiblix.read-write.fr/
Initially I tried to find the .hgrc file with spotlight but nothing came up. Happened to spotlight "~/", then this "~/.config" folder appeared, so I went there and found .hgrc in the same directory. Somehow it's always there but just not appearing even when called for in terminal.

Resources