リンク

リンク

octaveでgnuplotの波形が出ない時の対処法

$vi ~/.octaverc
setenv("GNUTERM","qt")

とりあえず動いた

homebrewでpython (anaconda) をインストールする

  • homebrewをアップデート
$ brew update && brew upgrade
Updated 1 tap (homebrew/core).
==> New Formulae
hesiod          osrm-backend    questdb         svgcleaner      typescript    
libsquish       piknik          rmlint          terragrunt      yarn          
nvc             pyinvoke        sql-translator  ttyd          
==> Updated Formulae
ace                        gprof2dot                  plantuml                 
android-ndk                grib-api                   ponyc                    
ansible-cmdb               gstreamermm                postgis                  
antigen                    gtkextra                   progress                 
apache-flink               gupnp-av                   prometheus               
aqbanking                  gx                         python                   
artifactory                gx-go                      python3                  
asciinema2gif              i2p                        qca                      
avro-c                     ice                        qjackctl                 
aws-sdk-cpp                imagemagick                qscintilla2              
awscli                     jemalloc                   qt5                      
azure-cli                  jenkins                    remctl                   
bash-git-prompt            jsonpp                     ripgrep                  
bear                       kerl                       rswift                   
bgpq3                      khard                      rtv                      
binwalk                    knot                       s-search                 
bitrise                    kubernetes-cli             shadowsocks-libev        
bsdconv                    ldns                       shyaml                   
cake                       libgee                     sonarqube                
cern-ndiff                 libiscsi                   sqldiff                  
certbot                    libnfs                     sqlite                   
chaiscript                 libnotify                  sqlite-analyzer          
cjdns                      libtorrent-rasterbar       ssdb                     
commandbox                 libxmp                     svtplay-dl               
conan                      liquibase                  tailor                   
consul-backinator          macvim                     tippecanoe               
cppcheck                   mailhog                    titan-server             
cromwell                   mariadb                    tmux                     
dbhash                     meson                      tomcat                   
digdag                     metabase                   vala                     
djview4                    metaproxy                  vapoursynth              
doctl                      micro                      vdirsyncer               
elixir                     mongoose                   verilator                
evince                     monkeysphere               vim                      
fabio                      mutt                       vultr                    
file-roller                mysql                      wine                     
geckodriver                node                       winetricks               
ghex                       node-build                 x265                     
git-credential-manager     offlineimap                xonsh                    
git-lfs                    open-babel                 yazpp                    
glib                       opencsg                    you-get                  
gnome-builder              oysttyer                   youtube-dl               
gnome-themes-standard      pazpar2                    zimg                     
gnuplot                    pcap_dnsproxy              zplug                    
gofabric8                  pgroonga                   zsh-navigation-tools     
==> Deleted Formulae
ezlupdate       pyside          pyside-tools    qwtpolar        shiboken 
  • pyenvをインストールして.bash_profileを設定
$ brew install pyenv
==> Installing dependencies for pyenv: autoconf, pkg-config, openssl, readline
==> Installing pyenv dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.el_capitan.bottle.
######################################################################## 100.0%
==> Pouring autoconf-2.69.el_capitan.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
==> Summary
?  /usr/local/Cellar/autoconf/2.69: 70 files, 3.0M
==> Installing pyenv dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.1_2.el_capitan.b
######################################################################## 100.0%
==> Pouring pkg-config-0.29.1_2.el_capitan.bottle.tar.gz
?  /usr/local/Cellar/pkg-config/0.29.1_2: 10 files, 627.4K
==> Installing pyenv dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2j.el_capitan.bottle
######################################################################## 100.0%
==> Pouring openssl-1.0.2j.el_capitan.bottle.tar.gz
==> Using the sandbox
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include
    PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig

==> Summary
?  /usr/local/Cellar/openssl/1.0.2j: 1,695 files, 12M
==> Installing pyenv dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.el_capitan.bottle.t
######################################################################## 100.0%
==> Pouring readline-7.0.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.


Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
?  /usr/local/Cellar/readline/7.0: 45 files, 2M
==> Installing pyenv
==> Downloading https://github.com/yyuu/pyenv/archive/v1.0.2.tar.gz
==> Downloading from https://codeload.github.com/yyuu/pyenv/tar.gz/v1.0.2
######################################################################## 100.0%
==> Caveats
To use Homebrew's directories rather than ~/.pyenv add to your profile:
  export PYENV_ROOT=/usr/local/var/pyenv

To enable shims and autocompletion add to your profile:
  if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
==> Summary
?  /usr/local/Cellar/pyenv/1.0.2_1: 522 files, 2.2M, built in 6 seconds

$ echo 'export PYENV_ROOT="${HOME}/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="${PYENV_ROOT}/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

$ exec $SHELL -l
  • pyenvでanacondaをインストールする
$ pyenv install -l | grep anaconda3
  anaconda3-2.0.0
  anaconda3-2.0.1
  anaconda3-2.1.0
  anaconda3-2.2.0
  anaconda3-2.3.0
  anaconda3-2.4.0
  anaconda3-2.4.1
  anaconda3-2.5.0
  anaconda3-4.0.0
  anaconda3-4.1.0
  anaconda3-4.1.1

$ pyenv install anaconda3-4.1.1
Downloading Anaconda3-4.1.1-MacOSX-x86_64.sh...
-> https://repo.continuum.io/archive/Anaconda3-4.1.1-MacOSX-x86_64.sh
Installing Anaconda3-4.1.1-MacOSX-x86_64...

home brewをインストールする

  • OSバージョン
    • OSX EI captain 10.11.6

  • javaのバージョンを確認
$ java -version 

java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833) 
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode) 

javaは問題無し。

$ xcode-select --install
xcode-select: note: install requested for command line developer tools

インストールされてなく、コマンドラインでベロッパーツールのインストールを促されたのでインストール。

数分でインストール完。再度コマンド実行しインストールされていることを確認。

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

自分の環境には/usr/localはすでにあったが、アップデートでEI Captainにしている場合にはパーミッションの関係で
問題が発生する可能性があるらしい。以下のコマンドを実行してパーミッションを変更する。

$ sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local


home brewをインストールする。

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

-e:82: warning: Insecure world writable dir /Users/kenji/local in PATH, mode 040777
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/bin
/usr/local/etc
/usr/local/opt
/usr/local/sbin
/usr/local/share
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/chmod u+rwx share/zsh share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown kenji /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/mkdir -p /Users/kenji/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/kenji/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown kenji /Users/kenji/Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 3376, done.
remote: Compressing objects: 100% (2395/2395), done.
remote: Total 3376 (delta 1544), reused 2156 (delta 847), pack-reused 0
Receiving objects: 100% (3376/3376), 2.17 MiB | 1.63 MiB/s, done.
Resolving deltas: 100% (1544/1544), done.
From https://github.com/Homebrew/brew
 * [new branch]      master     -> origin/master
 * [new tag]         0.1        -> 0.1
 * [new tag]         0.2        -> 0.2
 * [new tag]         0.3        -> 0.3
 * [new tag]         0.4        -> 0.4
 * [new tag]         0.5        -> 0.5
 * [new tag]         0.6        -> 0.6
 * [new tag]         0.7        -> 0.7
 * [new tag]         0.7.1      -> 0.7.1
 * [new tag]         0.8        -> 0.8
 * [new tag]         0.8.1      -> 0.8.1
 * [new tag]         0.9        -> 0.9
 * [new tag]         0.9.1      -> 0.9.1
 * [new tag]         0.9.2      -> 0.9.2
 * [new tag]         0.9.3      -> 0.9.3
 * [new tag]         0.9.4      -> 0.9.4
 * [new tag]         0.9.5      -> 0.9.5
 * [new tag]         0.9.8      -> 0.9.8
 * [new tag]         0.9.9      -> 0.9.9
 * [new tag]         1.0.0      -> 1.0.0
 * [new tag]         1.0.1      -> 1.0.1
 * [new tag]         1.0.2      -> 1.0.2
 * [new tag]         1.0.3      -> 1.0.3
 * [new tag]         1.0.4      -> 1.0.4
 * [new tag]         1.0.5      -> 1.0.5
 * [new tag]         1.0.6      -> 1.0.6
HEAD is now at 0546d90 Merge pull request #1251 from MikeMcQuaid/diagnostic-no-write-tmp
==> Homebrew has enabled anonymous aggregate user behaviour analytics
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 3733, done.
remote: Compressing objects: 100% (3623/3623), done.
remote: Total 3733 (delta 10), reused 358 (delta 1), pack-reused 0
Receiving objects: 100% (3733/3733), 3.00 MiB | 3.08 MiB/s, done.
Resolving deltas: 100% (10/10), done.
Checking connectivity... done.
Tapped 3612 formulae (3,760 files, 9.3M)
Already up-to-date.
==> Installation successful!
==> Next steps
Run `brew help` to get started
Further documentation: https://git.io/brew-docs


不要なのかもしれないが、参考にしたサイトで実行していた以下のコマンドを実行。

$ brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
    /opt/local/bin/ncurses5-config
    /opt/local/bin/ncursesw5-config
    /opt/local/bin/pkg-config

Warning: 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

Warning: You have leftover files from an older version of Xcode.
You should delete them using:
  /Developer/Library/uninstall-developer-folder

Warning: You have a non-Homebrew 'pkg-config' in your PATH:
  /opt/local/bin/pkg-config

`./configure` may have problems finding brew-installed packages using
this other pkg-config.

Warning: The directory Xcode is reportedly installed to doesn't exist:
  /Developer/Applications/Xcode.app/Contents/Developer
You may need to `xcode-select` the proper path if you have moved Xcode.

Warning: Your Xcode (7.3) is outdated.
Please update to Xcode 8.0 (or delete it).
Xcode can be updated from the App Store.

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example, 
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
  -h, --help                  print this help message and exit
  -p, --print-path            print the path of the active developer directory
  -s <path>, --switch <path>  set the path for the active developer directory
  --install                   open a dialog for installation of the command line developer tools
  -v, --version               print the xcode-select version
  -r, --reset                 reset to the default command line tools path
-bash: You: command not found


macportsが入っていたので削除(すっかり忘れていた)

$ sudo port -fp uninstall --follow-dependents installed
Warning: port definitions are more than two weeks old, consider using selfupdate
--->  Deactivating bzip2 @1.0.6_0
--->  Uninstalling bzip2 @1.0.6_0
--->  Deactivating imake @1.0.3_0
--->  Uninstalling imake @1.0.3_0
--->  The following versions of sqlite3 are currently installed:
--->      sqlite3 @3.7.3_0
--->      sqlite3 @3.7.4_0 (active)
Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.
--->  The following versions of sqlite3 are currently installed:
--->      sqlite3 @3.7.3_0
--->      sqlite3 @3.7.4_0 (active)
Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.
--->  Deactivating perl5 @5.8.9_0
--->  Uninstalling perl5 @5.8.9_0
--->  Deactivating perl5.8 @5.8.9_3
--->  Uninstalling perl5.8 @5.8.9_3
--->  Uninstalling pkgconfig @0.25_1
--->  Deactivating pkgconfig @0.25_2
--->  Uninstalling pkgconfig @0.25_2
--->  The following versions of sqlite3 are currently installed:
--->      sqlite3 @3.7.3_0
--->      sqlite3 @3.7.4_0 (active)
Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.
--->  Uninstalling sqlite3 @3.7.3_0
--->  Deactivating sqlite3 @3.7.4_0
--->  Uninstalling sqlite3 @3.7.4_0
--->  Deactivating xorg-bigreqsproto @1.1.1_0
--->  Uninstalling xorg-bigreqsproto @1.1.1_0
--->  Uninstalling xorg-cf-files @1.0.3_0
--->  Deactivating xorg-cf-files @1.0.4_0
--->  Uninstalling xorg-cf-files @1.0.4_0
--->  Deactivating xorg-inputproto @2.0.1_0
--->  Uninstalling xorg-inputproto @2.0.1_0
--->  Deactivating xorg-kbproto @1.0.5_0
--->  Uninstalling xorg-kbproto @1.0.5_0
--->  Deactivating xorg-libXau @1.0.6_0
--->  Uninstalling xorg-libXau @1.0.6_0
--->  Deactivating xorg-libXdmcp @1.1.0_0
--->  Uninstalling xorg-libXdmcp @1.1.0_0
--->  Uninstalling xorg-xproto @7.0.19_0
--->  Deactivating xorg-xproto @7.0.20_0
--->  Uninstalling xorg-xproto @7.0.20_0

 sudo rm -rf \
>   /opt/local \
>   /Applications/DarwinPorts \
>   /Applications/MacPorts \
>   /Library/LaunchDaemons/org.macports.* \
>   /Library/Receipts/DarwinPorts*.pkg \
>   /Library/Receipts/MacPorts*.pkg \
>   /Library/StartupItems/DarwinPortsStartup \
>   /Library/Tcl/darwinports1.0 \
>   /Library/Tcl/macports1.0 \
>   ~/.macports


older version of Xcodeのファイルを削除する、メッセージのコマンドをそのまま叩いた。

$ sudo /Developer/Library/uninstall-developer-folder
Use of uninitialized value $pkgutil_volume_basename in concatenation (.) or string at /Developer/Library/uninstall-developer-folder line 35.
Start time: 20161010日 月曜日 094934秒 JST
Analyzing devtools package: 'com.apple.pkg.ApplicationLoader'...
Analyzing devtools package: 'com.apple.pkg.DashcodeLeo'...
Analyzing devtools package: 'com.apple.pkg.DevDocumentationLeo'...
Analyzing devtools package: 'com.apple.pkg.DevSamplesLeo'...
Analyzing devtools package: 'com.apple.pkg.DevToolsDocumentationLeo'...
Analyzing devtools package: 'com.apple.pkg.DeveloperDiskImage4_0'...
Analyzing devtools package: 'com.apple.pkg.DeveloperDiskImageReleased'...
Analyzing devtools package: 'com.apple.pkg.DeveloperToolsCLILeo'...
Analyzing devtools package: 'com.apple.pkg.DeveloperToolsLeo'...
Analyzing devtools package: 'com.apple.pkg.MacOSX10.5Leo'...
Analyzing devtools package: 'com.apple.pkg.MacOSX10.6Leo'...
Analyzing devtools package: 'com.apple.pkg.OpenGLAppsLeo'...
Analyzing devtools package: 'com.apple.pkg.OtherDevDocumentationLeo'...
Analyzing devtools package: 'com.apple.pkg.X11DocumentationLeo'...
Analyzing devtools package: 'com.apple.pkg.clangLeo'...
Analyzing devtools package: 'com.apple.pkg.gcc4.0ADCDocsLeo'...
Analyzing devtools package: 'com.apple.pkg.gcc4.0Leo'...
Analyzing devtools package: 'com.apple.pkg.gcc4.2ADCDocsLeo'...
Analyzing devtools package: 'com.apple.pkg.gcc4.2Leo'...
Analyzing devtools package: 'com.apple.pkg.iPhoneDocumentation'...
Analyzing devtools package: 'com.apple.pkg.iPhoneHostSideTools'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDK3_0'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDK3_1'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDK3_1_2'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDK3_1_3'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDK3_2'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDK4_0'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDKSnowLeopardExtras'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSDKTools'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSimulatorSDK3_2'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSimulatorSDK4_0'...
Analyzing devtools package: 'com.apple.pkg.iPhoneSimulatorSDKTools'...
Analyzing devtools package: 'com.apple.pkg.llvm-gcc4.2Leo'...
Removing devtools files...
Removing generated files...
Removing Xcode Caches...
Removing Xcode Documentation...
Removing empty devtools directories...
Finish time: 20161010日 月曜日 095038秒 JST


Xcode 8.0をAppStoreからインストール。

PATHの設定で/usr/local/binを先に見るように設定を追加。

export PATH=/usr/local/bin:/usr/local/sin/:$PATH


再度brew doctorを実行。ようやくエラーなど出なくなった。

$ brew doctor
Your system is ready to brew.