Error: Could not symlink bin/dvipdf when installing Octave - octave

I am trying to install Octave on Mac OS Mavericks with Brew. I ran
brew install octave --without-docs
which almost instantly gave me
Error: You must `brew link ghostscript' before octave can be installed
I did it, and it gave me the following:
Error: Could not symlink bin/dvipdf
Target /usr/local/bin/dvipdf
already exists. You may want to remove it:
rm /usr/local/bin/dvipdf
To force the link and overwrite all conflicting files:
brew link --overwrite ghostscript
To list all files that would be deleted:
brew link --overwrite --dry-run ghostscript
I ran the last, which showed me a bunch of files I have never seen before. What shall I do? Erase them with brew link --overwrite ghostscript, or do something else?
Thanks

This work for me
1.you should delete ghostscript in /usr/local/share
2.brew doctor,it will prompt you with some options
3.brew link --overwrite ghostscript
4.you can brew install octave

Related

How can I get the keyring extension working for mercurial in Ubuntu 18.04?

I've tried dozens of guides on installing mercurial and keyring extensions on Ubuntu and have never been able to get the keyring extension to work. It was a snap under Windows.
I've installed mercurial many different ways. I'm not sure if the install method has anything to do with the keyring, but here are a few of the things I've tried:
sudo apt-get install mercurial
sudo apt install mercurial
pip install mercurial
... and so on.
I even used this method where it compiles mercurial.
All of these methods work for mercurial. It runs. I can do commits, etc. It's keyring and mercurial_keyring installations that are giving me trouble. I installed both of those using pip install. When I do a command like:
hg out http://somerepo
At the moment, I'm getting the following message:
No handlers could be found for logger "keyring.backend"
I feel like there is a concise set of steps to get keyring working, but it's just eluding me. I've made half a dozen attempts on fresh virtual machines and can never get this to work. :(
pip uninstall keyring
The reason is that python has already the library python-keyring installed which conflicts with the one installed with pip. Credits to Python library woes on Ubuntu 18.04 by Kai Koenig
Edit: the story actually did not end there because what it did was to get rid of that error but was not the actual solution. I had to continue with these commands
pip install keyrings.alt
pip install keyring
(yes, I installed it back)
python -c "import keyring.util.platform_; print(keyring.util.platform_.config_root())"
That was taken from keyring docummentation. It turned out that my config folder shown by this command was not created so I did:
mkdir ~/.local/share/python_keyring
vi ~/.local/share/python_keyring/keyringrc.cfg
I had to create the .cfg file as well and put this inside (on my MacOS Mojave!):
[backend]
default-keyring=keyring.backends.OS_X.Keyring
Now everything works fine, no password asked anymore

Trying to access MySQL with perl script [duplicate]

Install information:
Using DBI 1.608 (for perl 5.008009 on x86_64-linux) installed in /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/auto/DBI/
error information:
[root#datacenterETL DBD-mysql-4.020]# perl ../testConnect.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in #INC (#INC contains: /usr/local/lib/perl5/5.8.9/x86_64-linux /usr/local/lib/perl5/5.8.9 /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.9 .) at (eval 3) line 3.
Perhaps the DBD::mysql Perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right.
It looks like you're using Linux. In that case, you might find it easier to install a pre-packaged version of the module.
On a Red Hat derivative try yum install perl-DBD-mysql; on a Debian derivative try apt-get install libdbd-mysql-perl.
Perhaps the DBD::mysql perl module hasn't been fully installed
...so install it.
cpan DBD::mysql
Or since you don't have internet access,
perl Makefile.PL
make
make test
make install
You'll need MySQL's development header files installed first, as per INSTALL
any error related to DBD::mysql error has not installed fully. Please run the below code in super user permission.
apt-get install libdbd-mysql-perl
As is was not able to comment (yet), I want to add something for the Mac Users.
I hat to add the --force command to install the everything properly as i have no local mySQL installation for the tests to pass.
/usr/bin/cpanm --force DBD::mysql worked for me. (Mac OS 10.9.2, Perl 5.12.4)
I've been tried perl -MCPAN -e shell on my mac OSX 10.8.5, but this didn't work.
I tried sudo perl -MCPAN ..., but didn't work too. I changed my ~.bash_profile to include
LD_RUN_PATH=/usr/local/mysql-5.6.13-osx10.7-x86_64/lib export LD_RUN_PATH
LD_LIBRARY_PATH=/usr/local/mysql-5.6.13-osx10.7-x86_64/lib export LD_LIBRARY_PATH
lines, and I tried -MCPAN again, with and without sudo, but this didn't work too.
I read some posts and I tried "get Bundle::DBD::mysql" in -MCPAN command line to download it and install with Makefile. Then, I entered the ~./cpan/build directory and I did a Makefile, but the make command didn't work. I tried Makefile with --testuser and --testpassword that I just had been configure in mysql. I entered the site https://discussions.apple.com/thread/3932531?start=0&tstart=0&fb_source=message that is informed in README doc of ./cpan/bundle, but I already had all command line tools of xCode installed and didn't work for me too.
Why don't do sudo perl -MCPAN -e shell and to force to install Bundle::DBD::mysql? This worked well and I got the installation.

htmltidy linter does not have a file in directory usr/local/bin

So I recently installed a few linters for sublimelinter and so far all work except htmltidy. I installed as directed using terminal (I'm running OSX) in the following way:
sudo npm install -g htmltidy
This worked for CSSLint, JSHint etc. but not htmltidy. i checked usr/local/bin and it turns out that there is no .js file for htmltidy. How could I fix this?
Run whereis htmltidy. If that does not return anything close out of terminal and open it back up. The installer might of added something to your path but didn't resource it.
If that doesn't work run sudo find -name htmltidy /

Error while installing Octave

I am trying to install Octave on OS X. When executing brew install octave I get the following error:
octave: A LaTeX distribution is required to install.
You can install MacTeX distribution from:
http://www.tug.org/mactex/
Make sure that "/usr/texbin", or the location you installed it to, is in
your PATH before proceeding.
I downloaded and installed MacTeX but it is still not working :(
How can I fix this?
If you want to avoid the MacTeX dependency you can install Octave with brew as follows:
brew install octave --without-docs
"Make sure that "/usr/texbin", or the location you installed it to, is in
your PATH before proceeding."
This message may be the hint of the answer for you.
You need to set the PATH so that the Tex could be called from anywhere in your system.
Adding the following line in the .bash_profile may fix it.
export PATH=$PATH:/usr/texbin/
The reason why the texlive command does not work have also same cause on this.

Mac Homebrew own Package, link error: No such keg

I am currently using the Macbook pro with OS 10.9.
And I was trying to install octave to my mac when I found that I have to install gnuplot before I could use the plot in the octave. So I try to install gnuplot using the homebrew. However,the brew got stuck when trying to install the gd, because China's network fails to link to the site https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz
So I use goagent to download the package via chrome and try to manually install the package and try to link it using brew by the instruction from https://github.com/mxcl/homebrew/wiki/FAQ
And after make install, when I try to use:
brew link libgd
the brew prompt error message:
Error: No such keg: /usr/local/Cellar/libgd
And I followed exactly the process in the FAQ diy.
$ tar -xvf l-ibgd-2.1.0.tar.gz
[snip]
$ cd libgd-2.1.0
$ brew diy
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/libgd/2.1.0
$ ./configure --prefix=/usr/local/Cellar/libgd/2.1.0
[snip]
$ make && make install
[snip]
$ brew link libgd
Error: No such keg: /usr/local/Cellar/libgd
The configuration and installation are without any error. Any suggestions? Thx a lot!
There are several things wrong here, and I'm not sure whether they are Homebrew bugs or incomplete transcription on your part.
First, the package is called gd, not libgd, so there would be /usr/local/Cellar/gd, not /usr/local/Cellar/libgd.
Second, brew diy appears to suggest a cmake invocation, but gd uses autotools, so that is wrong.
Ultimately, this should work if you string it all together correctly, but actually, if you have problems with reaching a mirror over http, I would just put the tarball somewhere else and edit the formula file (brew edit gd) to point to that new location. Much easier, and you can even save your modification in a local Git branch.