Trying to install FFmpeg via mac terminal and can't cd into the yasm folder - macos

I couldn't expand the yasm archive via terminal so I did it via Finder, went back to terminal to cd into the folder and it says it doesn't exist even though I'm looking right at it in the Finder. What am I missing?
I took a screenshot but my reputation isn't high enough to post it. You can see it here:

It's better if you install it via Homebrew:
brew install yasm
brew install ffmpeg
If you don't have homebrew installed you can do it by typing the following:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Related

how to uninstall homebrew using an arm based Mac?

I installed homebrew today. And I did something wrong so that my homebrew can't work now. Since I use an arm based mac, I am hard to find solution to uninstall my homebrew which installed in /opt/homebrew/.
To uninstall Homebrew, run the uninstall script from the Homebrew/install repository.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Download the uninstall script and run /bin/bash uninstall.sh --help to view more uninstall options.
Make sure your homebrew path is correct and then run the script:
echo $HOMEBREW_PREFIX #=> /opt/homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
See: https://github.com/homebrew/install#uninstall-homebrew

Automated installation with Brew/cask in apps folder

I want create an automated script to use on a post installation.
For this reason i want use brew and cask to make it all.
So, i think that my script should start with that to install brew:
echo << "Installing homebrew..."
if test ! $(which brew); then
echo "Homebrew not found, Installing..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
Then i need to install some useful stuff as i see here:
http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
So i put this too on my script:
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Bash 4
brew install bash
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
$PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
After that, the guide on the link says to install all the apps with cask and clean.
Here is my question.
I wish install and can update them in future using the classical Application folder of mac
How i can do that?
Maybe i should put this line:
export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/usr/local/Caskroom"
Before all the commands to install the apps? May it works? (I have found this line here around)
If this line is correct can I update my apps using a brew/cask command?
Sorry for the dumbs questions, I've just discovered brew and cask yesterday :)
Any suggestion or example for this script is well accepted :)
brew cask install <formula> is supposed to symlink your app in Applications automatically.

Homebrew not installed to /usr/local

I'm trying to get a new computer set up and installed Homebrew with ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" following the instructions on their home page. The problem is, when I ran brew doctor it gave me this error: Your Homebrew is not installed to /usr/local You can install Homebrew anywhere you want, but some brews may only build correctly if you install in /usr/local. Sorry!
When I did the install from terminal I was in the Home directory.
From what I've read Homebrew is supposed to install to /usr/local by default so I'm not sure how I screwed this up...
Any ideas how to get Homebrew installed to the correct location?
It seems that when I installed RVM it also installs Homebrew. More info here: https://github.com/mxcl/homebrew/issues/19454#issuecomment-17086674

Error Installing Homebrew - Brew Command Not Found [duplicate]

This question already has answers here:
Installing Homebrew on macOS
(24 answers)
Closed 2 years ago.
I've spent the bulk of my Friday trying to get the latest version of Ruby installed on my new MacBook Air (w/ Mountain Lion installed).
I have all the latest versions of XCode and command line tools. But I can't seem to get Homebrew to work! Here's a screenshot of where I keep getting stuck (I'm a new user, so can't embed this image).
As you can see I used the following to instal Homebrew:
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go/install)"
While there was a "warning" it seemed as though the installation worked:
Warning: /usr/local/bin is not in your PATH.
==> Installation successful!
Despite that, when I try to run "brew doctor" I received the following:
-bash: brew: command not found
Again, I'm trying to install homebrew, so i can instal the latest version of ruby -- I'm looking to learn to code in ruby, but kind of screwed if I can even get a development environment running! :)
The warning is telling you what is wrong. The problem is that brew is kept in /usr/local/bin
So, you can try /usr/local/bin/brew doctor
To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line:
export PATH=/usr/local/bin:$PATH
On Apple silicone it's
export PATH=/opt/homebrew/bin/:$PATH
Check XCode is installed or not.
gcc --version
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update
http://techsharehub.blogspot.com/2013/08/brew-command-not-found.html "click here for exact instruction updates"
nano ~/.profile
add these lines:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
save the file:
Ctrl + X then Y then Enter
then render the changes:
source ~/.profile
This was just happening to me, but none of the suggestions above worked. I changed directories ("cd ~/tmp") and suddenly the command
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
worked for me. Prior to changing directories I had been in a directory that is a Git repository. Perhaps that was interfering with the ruby and Git commands in the Brew install script.
You can run in terminal
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
then install https://github.com/robbyrussell/oh-my-zsh.
When those complate run i.e pico editor pico .zshrc and past those lines:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
remember use brew doctor :)
try this
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)"
You can use this:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
to install homebrew.

How can I install Apache Ant on Mac OS X?

I tried to install Apache Ant on my Mac and I followed the next steps :
I downloaded apache-ant-1.8.1-bin.tar.gz into my Downloads folder.
I moved the file to /usr/local/ using this commands : sudo sh and mv apache-ant-1.8.1-bin.tar.gz /usr/local/
Now I want to use cd /usr/local/ but it's not working, I get back "No such file or directory".
Then I used cd /usr/ and ls commands and it seems that the local folder is there. If I try to access it I get the same error.
Since I already used sudo su why I can't access it? Any ideas?
Ant is already installed on some older versions of Mac OS X, so you should run ant -version to test if it is installed before attempting to install it.
If it is not already installed, then your best bet is to install Homebrew (brew install ant) or MacPorts (sudo port install apache-ant), and use those tools to install Apache Ant.
Alternatively, though I would highly advise using Homebrew or MacPorts instead, you can install Apache Ant manually. To do so, you would need to:
Decompress the .tar.gz file.
Optionally put it somewhere.
Put the "bin" subdirectory in your path.
The commands that you would need, assuming apache-ant-1.8.1-bin.tar.gz (replace 1.8.1 with the actual version) were still in your Downloads directory, would be the following (explanatory comments included):
cd ~/Downloads # Let's get into your downloads folder.
tar -xvzf apache-ant-1.8.1-bin.tar.gz # Extract the folder
sudo mkdir -p /usr/local # Ensure that /usr/local exists
sudo cp -rf apache-ant-1.8.1-bin /usr/local/apache-ant # Copy it into /usr/local
# Add the new version of Ant to current terminal session
export PATH=/usr/local/apache-ant/bin:"$PATH"
# Add the new version of Ant to future terminal sessions
echo 'export PATH=/usr/local/apache-ant/bin:"$PATH"' >> ~/.profile
# Verify new version of ant
ant -version
For MacOS Maveriks (10.9 and perhaps later versions too), Apache Ant does not come bundled with the operating system and so must be installed manually. You can use brew to easily install ant. Simply execute the following command in a terminal window to install brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It's a medium sized download which took me 10min to download and install. Just follow the process which involves installing various components. If you already have brew installed, make sure it's up to date by executing:
brew update
Once installed you can simply type:
brew install ant
Ant is now installed and available through the "ant" command in the terminal.
To test the installation, just type "ant -version" into a terminal window. You should get the following output:
Apache Ant(TM) version X.X.X compiled on MONTH DAY YEAR
Source: Error executing command 'ant' on Mac OS X 10.9 Mavericks when building for Android with PhoneGap/Cordova
If you are getting errors installing Brew, try uninstalling first using the command:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
Thanks to OrangeDog and other users for providing additional information.
If you have MacPorts installed (https://www.macports.org/), do this:
sudo port install apache-ant
If you're a homebrew user instead of macports, homebrew has an ant recipe.
brew install ant
To get Ant running on your Mac in 5 minutes, follow these steps.
Open up your terminal.
Perform these commands in order:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ant
If you don't have Java installed yet, you will get the following error: "Error: An unsatisfied requirement failed this build."
Run this command next: brew cask install java to fix this.
The installation will resume.
Check your version of by running this command:
ant -version
And you're ready to go!
Use Brew is always good way to install ANT and other needs.
To install type below command on terminal.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
after Brew installation , type
brew install ant
This will install Ant on your system. Also you will not need to worry about setting up the path.
Also i have documented on the same - How to Install ANT on Mac OS?
The only way i could get my ant version updated on the mac from 1.8.2 to 1.9.1 was by following instructions here
http://wiki.eclipse.org/Ant/User_Guide
MacPorts will install ant for you in MacOSX 10.9. Just use
$ sudo port install apache-ant
and it will install.

Resources