Install gcc49 via homebrew failed - gcc

I am trying to install gcc49 via homebrew.
I give a command like:
brew install gcc49
but it is stuck at
==> ../configure --build=x86_64-apple-darwin13.0.2 --prefix=/usr/local/Cellar/gc
==> make bootstrap

It takes quite sometime. I did not time it per se - but I left it working for around 1.5 hours before I returned to the window - then it was done. So timewise anything between 15 min and 1.5hrs I'd say. If you are running your terminal in a window and text keeps changing in the header it's all good. Just don't cancel it - let it do it's work. If you have other things to do, get those done first; if not - go on youtube :)

It takes time. On my computer it takes about 1 hour. so just be patient and let it works. Even sometimes the header of Terminal does not change and stop on "cc1plus". Don't cancel it and do other thing until it will be done :)

Related

The 'termux-battery-status' command in (Termux: API) does not work

I want to know the current battery value on my phone, but I can not do this. When I enter the 'termux-battery-status' command, my terminal hangs (it doesn’t output anything).
I read on various forums about changing application settings Like this or like this.
My telephone:
$ termux-info
Packages CPU architecture: aarch64
Updatable packages: All packages up to date
Android version: 9
Kernel build information: Linux localhost 4.9.117+ #4 SMP PREEMPT Mon Jul 8 17:13:44 CST 2019 aarch64 Android
Device manufacturer: Blackview
Device model: A60Pro
Termux Settings:
I do not understand how to fix this. :/
Help me please.
Please install the Termux:API app on your device : https://play.google.com/store/apps/details?id=com.termux.api
After installation, head over to App Info for the Termux:API app, and allow all the permissions including Modifying System Setting.
Try termux-api-start command first. This is what helped me
RUN Termux-API in your phone in 2023
This will solve all the termux-api problems including Termux-battery-status issue.
Since Developers have stopped updating the playstore version of termux it is not going to work properly, so from now on we have to use termux from the f-droid website. Also, you need to install the termux-api.apk to make these api commands work. below is the simple code that can make everything work in few seconds
So firstly install termux application from F-Droid, Download link. If you are already using the F-Droid version, then skip this step.
Just copy the entire code directly and paste it inside your termux. it will open the termux-api page for you, just install it and everything will be fixed.
echo -e "\e[031m" "HEY, MAKE SURE TO INSTALL THE TERMUX API APP THEN
COME BACK AGAIN IN TERMUX" && sleep 2 && xdg-open
"https://f-droid.org/repo/com.termux.api_51.apk"&& echo -e '\e[032m'
'HAVE YOU INSATLLED TERMUX API APK? IF YESS THEN PRESS ENTER, IF NO
THEN RE-RUN THE SCRIP AND THIS TIME INSTALL THE APK IN YOU PHONE' &&
read r && pkg install "termux-api" && exit
type termux-battery-status to find the battery info.
To make everything work even smoother, go in your settings>apps> search Termux:API and make sure to allow every permission you can enable.
download termux api app from play store then you can easily use that commands its 200% true just try its only 2MB app

Apache Flink Installation 1.6.2 on Mac with Homebrew

I am trying to use Apache Flink for the first time for a school project, but I'm running into some trouble after installation. I have tried to follow the Quicksetup on the site, but I keep running into the same problem.
(https://ci.apache.org/projects/flink/flink-docs-stable/quickstart/setup_quickstart.html)
Console Output
The brew installation seems to work fine, this is where I ran into the first inconsistency however. Next the guide tells me to execute the following line
$ ./bin/start-cluster.sh # Start Flink
which doesn't work without installing a binary from here though
https://flink.apache.org/downloads.html
So I did that (I downloaded the Flink 1.6.2 with Hadoop 2.7 binary) and was then able to find the file and execute it. After doing this I'm supposed to go the the web frontend, and verify that a task is running. However when I go there nothing is shown.
Console Output
Web Dashbord
I started by executing the stop-cluster file, because for some reason I'm constantly getting the INFO Message
[INFO] 1 instance(s) of standalonesession are already running on Moritzs-MBP.fritz.box.
So far I have tried to to look into the flink-conf.yaml file which does set the numberOfTaskSlots to 1, so the problem does not seem to lie there. Otherwise I didn't really know where to look from there however and only tried to uninstall the and reinstall everything with no results however.
Sorry that the images are not shown, previously I had been able to fix all my code problems with existing posts and thus I can't directly post them yet. Any help would be much appreciated, thanks in advance,
Moritz
By using brew installation, the start-cluster.sh should be able to found in:
/usr/local/Cellar/apache-flink/1.6.2/libexec/bin
I'm not sure why start-cluster.sh isn't succeeding in starting up a taskmanager, but you can always (try to) start another one by hand with
$ ./bin/taskmanager.sh start

An error occurred while installing ffi (1.9.21), and Bundler cannot continue. Make sure that `gem install ffi -v '1.9.21'` succeeds before bundling

This is my first question on SO, so I hope it's ok that I'm doing this. I have now had this problem twice and pulled my hair out searching for an answer. I found it the first time, and then forgot what the solution was. Now that I have worked it out again I wanted to make sure other people don't struggle with it because it's really simple in the end.
All I'm trying to do is make a new Jekyll site, which I've done tons of times before. It's all fine until I try to bundle anything, and then I get the error in the title of this question. I'm on macOS Sierra, and have updated it from El Capitain since last using Jekyll. Same last time, on my other computer.
Running gem install ffi -v '1.9.21' gives the following error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - /usr/local/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/COPYING
I'm not sure whether to give the answer here or let somebody else answer it. I just want to be able to find this question next time I forget and try every other ffi-related thing on the internet!
I'm just going to answer it. I needed to re-install the command line dev tools because I had updated my OS.
A simple xcode-select --install and then posted this question while I waited.
Kinda face-palm, but definitely not obvious if you try Googling the error messages!
Can't believe I did this twice.
This worked for me on my Mac:
gem install ffi -v '1.9.18' -- --with-cflags="-Wno-error=implicit-function-declaration"
Yes , i did , for mac should update a system , then wel be work....

MacVIM - Python 3 Error

I have Anaconda Python3.6. I have been trying to reinstall MacVIM on El Captain by the following method:
brew tap macvim-dev/macvim
brew install --HEAD macvim-dev/macvim/macvim --with-properly-linked-python2-python3
I followed the instructions from the installation of MacVIM here
I get the following error:
if_python3.c:75:10: fatal error: 'Python.h' file not found
#include <Python.h>
^
1 error generated.
make[1]: *** [objects/if_python3.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [first] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/macvim-dev/homebrew-macvim/issues
Error: Your Xcode (7.3.1) is outdated.
Please update to Xcode 8.2.1 (or delete it).
Xcode can be updated from the App Store.
Error: You have MacPorts or Fink installed:
/opt/local/bin/port
This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.
sudo mv /opt/local ~/macports
I have looked online and I see that a similar bug has been reported here for Fedora.
I also looked at the error and tried to update X-Code. The thing is that I don't want to upgrade by OS at this time and just want to update X-Code. I looked in the App Store Update and I clicked "Update" and it doesn't seem to be working. When I click "Update", it stalls and nothing happens.
So, I looked up the command
softwareupdate --list
and X-Code does not show up there. I looked up this on Stack Overflow and the comments seem to clearly indicate that even the selected answer is wrong. I don't want to upgrade my OS but I want to install MacVIM with python3 support. I was hoping someone can help me regarding this?
Note : I have not tried to uninstall Macports or Fink (not sure what this is). This is mentioned in the error. Would the removal or movement of them help? I just don't want to do anything I might regret later.
I had the same problem even with Xcode 8.2.1. The compilation stalled at the same place. After several attempts, I found a workaround.
Firstly, you need to open the problematic if_python3.c from another editor, e.g. Sublime Text. It is normally situated at
~/Library/Caches/Homebrew/macvim--git/src/if_python3.c
Go to line 75, replace the #include <Python.h> with #include "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/Python.h", or the path of Python.h of python3 on your mac. Save it. (cmd+s in sublime text).
Run the brew install command again. Once you see
==> Cloning https://github.com/macvim-dev/macvim.git
from the terminal, it will git pull and overwrite your previous change in step 2. So you must take a close eye on if_python3.c from sublime text. Once you notice the line 75 reverted back to #include <Python.h>, immediately press cmd+z, cmd+s to recover and save the change.
I used this trick and successfully built macvim.

RVM can't install ruby on MacOS

I type this command :
$ rvm install 2.0.0 --with-readline-dir=$rvm_path/usr
Then i press "Ctrl+Z", So RVM is exit.
But When i type command again,
It's stop here...
So, How to resolve it , and install ruby right way?
This step depends on the bandwidth of your internet connection and configuration of your machine and can take upto 15 - 30 minutes. This first downloads(Bandwidth) the ruby binaries and then compiles(CPU + RAM dependent) it.
Also, in your case, its updating system packages.
You should not add --with-readline-dir=$rvm_path/usr - rvm handles this for you automatically.
As for the process - it takes long but should finish in less then hour (on slow internet connection and computer it could be few).
If the process does not show any changes in like 15 minutes you can try two things:
open another console/tab and monitor processes with top, on the top of list you should see something like ruby, curl, cc1, make ... but anything with more then 10-20% in the %CPU column will indicate - work is done.
break the process (CTRL+C) and start it again with:
rvm install 2.0.0 --debug
now it will show more details about what is going on - including log files where all outputs are redirected, you can watch those log files in other console with less (to see from start to current position) or tee -f (to see the changes as they happen)
Ok,I just restart my mac,then install again,that's all
Also just noticed the CTRL+Z - this can be holding some processes that block RVM - try running fg 1 - it should start the stopped process.
For more information about CTRL+Z vs. CTRL+C see https://superuser.com/questions/262942/whats-different-between-ctrlz-and-ctrlc-in-unix-command-line
To echo Nerve's answer and depa - I am fuzzy on why installing with RVM is such a pain - but Homebrew is going to be your best friend when it comes to doing the installations. I had trouble too.
Here is a link to a set up tutorial that i followed: http://tutorials.jumpstartlab.com/topics/environment/environment.html
Make sure homebrew (http://brew.sh/) is installed and if this is your first set up, try looking through the tutorial on set up and seeing if you missed anything
if that doesn't do it - some back and provide more information on what you've done so far and already have set up!

Resources