Reputation: 151
I tried installing gnuplot on a Mac (Mojave 10.14.2) using homebrew today, and it brew is not accepting --with-qt nor --with-x11
(I tried other variants, such as --with-qt5 and --with-x, with no luck.)
brew options gnuplot did not report any options.
How are we supposed to get the qt and x11 terminals installed on gnuplot now?
Upvotes: 8
Views: 9624
Reputation: 111
After a lot of attempts, the only way for me was to remove gnuplot and reinstall using homebrew. But if I did brew install gnuplot
I got the error that /usr/local was not writable and I couldn't change the permission to /usr/local. So i used the method here.
So the sequence that worked for me is:
Uninstall gnuplot using a method depending how it was installed.
Uninstall homebrew using
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
reinstall homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
install gnuplot using
brew install gnuplot
Upvotes: 0
Reputation: 108
Default brew gnuplot installation on Mojave is broken. The best way to solve this problem would be to install a custom "tap" with a working formula, as described here: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
If you just want a quick solution: the following manual recompilation with necessary options works just fine. Here's what brew was reporting for me when installing gnuplot:
$ brew reinstall gnuplot
==> Reinstalling gnuplot
==> Downloading https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.2.7/gnuplot-5.2.7.tar.gz
==> Downloading from https://versaweb.dl.sourceforge.net/project/gnuplot/gnuplot/5.2.7/gnuplot-5.2.7.tar.gz
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=~/brew/Cellar/gnuplot/5.2.7_1 --with-readline=~/brew/opt/readline --without-tutorial --disable-wxwidgets --with-qt --without-x
==> make
==> make install
🍺 ~/brew/Cellar/gnuplot/5.2.7_1: 48 files, 2.9MB, built in 1 minute 47 seconds
Uninstall gnuplot, download the package, configure it to your liking and reinstall manually to the brew location:
brew uninstall gnuplot
### Downloading sources
mkdir ~/src
cd ~/src
wget https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.2.7/gnuplot-5.2.7.tar.gz
tar zxvf gnuplot-5.2.7.tar.gz
cd gnuplot-5.2.7
### Configuring with x11
./configure --disable-silent-rules --prefix=~/brew/Cellar/gnuplot/5.2.7_1 --with-readline=~/brew/opt/readline --without-tutorial --with-cairo --with-qt --with-x
### Uninstall gnuplot from brew and install the substitute
make -j
make install # installs to the same location where brew would
brew link gnuplot
Upvotes: 2
Reputation: 11
The homebrew team is removing all options from core formulas. https://github.com/Homebrew/homebrew-core/issues/31510
Upvotes: 1
Reputation: 151
I contacted the brew maintainer who had most recently modified the gnuplot formula. Brew is no longer allowing options in formulas, so "brew install gnuplot --with-x11" can no longer be done, but "brew install gnuplot" installs the qt terminal and useful terminals from the cairo package, but not the x11 terminal. I caught the formula during a couple of hour window when the formula was broken. It is now working, but with no way to install the x11 terminal. (It might be worthwhile for someone willing to maintain the formula to
Upvotes: 6
Reputation: 207465
I don't know the official line/story/explanation, I only worked out the following by experiment. If someone knows better, please let me know and I will delete this.
I just ran brew info gnuplot
and the X11
and Qt
options were present. I then ran brew update
and they are indeed now gone. I noticed that brew info gnuplot
now shows Qt
as "required".
So, I removed gnuplot with brew rm gnuplot
and then installed it again with brew install gnuplot
and it installed the required and hitherto missing dependency Qt
.
If I now do:
export GNUTERM=qt
gnuplot
It reports:
Terminal type is now 'qt'
and the following throws up a Qt
window:
gnuplot> plot sin(x)
Upvotes: 1