回答:
私はSaucyからbison(2.7.1)とlibbison-dev(2.7.1)の最後のパッケージをインストールしました。
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb
更新マネージャーがこのパッケージを上書きしないようにするには
apt-mark hold libbison-dev
apt-mark hold bison
できた
apt-mark hold libbison-dev、およびapt-mark hold bison
次のようにパッケージバージョンも指定します。
apt-get install pkg=version
使用可能なすべてのバージョンを取得できます apt-cache showpkg bison
apt-get install bison=2:2.7.1.dfsg-1が、apt-getまだ文句を言いますE: Version '2:2.7.1.dfsg-1' for 'bison' was not found
apt-cache showpkg bisonして利用可能なバージョンを確認することで確認できます。1つの簡単な方法は、bison 2.7をインストールするためにsaucy devリポジトリを追加することです。
linuxbrew経由でbisonバージョン2.7をインストールできます。linuxbrewをインストールしたら:
ruby -e "$(wget -O- https://raw.github.com/Homebrew/linuxbrew/go/install)"
.bashrcまたは.zshrcの最後に次を追加します。
export PATH="$HOME/.linuxbrew/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH"
Bison 2.7をインストールできます!
brew install bison27
HomebrewはMacを対象としているため、brew doctorを実行するとMacを適切に使用しないと怒鳴ります。MacにはすでにBisonがインストールされているため、インストールの完了は拒否されます。以下を行うことで安全に強制できます:
brew link bison27 --force
そしてbison -Vをチェックして、Bison 2.7を使用していることを確認してください!