[LTspice] Debian LinuxでLTspiceをインストールしてみる
※ 当ページには【広告/PR】を含む場合があります。
2020/07/03
最近ご無沙汰だったLTspiceをDebian Linuxにインストールして起動させてみたときのハウツーをまとめます。
LTspice
LTspiceは、無償でありながら有償のSPICEソフトウェアにも引けを取らないアナログ回路シミュレーターソフトです。
Linuxへの導入
残念ながらLTspiceはWindows向けかOSX向けにしかソフトウェアを提供していないため、

ダウンロードした
LTspiceXVII.exe
Wineのインストール
windows用のexe形式の実行バイナリをLinuxで動作させるのに一番手っ取り早いのが
wine
$ sudo apt-get update
$ sudo apt-get install wine
#...インストール作業中略
$ wine --version
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
wine-4.0 (Debian 4.0-2)
これでDebianにwineが導入されました。 途中、
wine32
今回の手元のデスクトップではDebianOSは64bitアーキテクチャですので、コマンドラインでインストールされるのは
wine64
何も考えずにLTspice.exeを実行してます。
$ wine LTspiceXVII.exe
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
wine: created the configuration directory '/home/**********/.wine'
0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0012:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0012:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0012:err:ole:get_local_server_stream Failed: 80004002
0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0014:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0014:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0014:err:ole:get_local_server_stream Failed: 80004002
Could not load wine-gecko. HTML rendering will be disabled.
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
Could not load wine-gecko. HTML rendering will be disabled.
wine: configuration in '/home/**********/.wine' has been updated.
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
wine: Z:\home\*********\ltspice\LTspiceXVII.exe の EXE フォーマットが不正です。
...起動が失敗しました。
実際32bitOSならば問題ないのですが、現在は64bitOSが主流かと思いますので、LTspiceを動作させるには、
wine32
wine32
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install wine32
#32bit用のライブラリがインストールされる
#...以下略
といくつかファイルがmissingしているような警告が出ますが、とりあえず無視しても良さそうです。 再度、
LTspice
LTspiceの起動
$ LANG='ja_JP.UTF-8' wine LTspiceXVII.exe
すると、最初にインストーラが起動してきます。

とりあえず
[Accept] --> [x64(64bit)] --> [Install now]

問題がなければ、インストールが完了したとダイアログが出ますので、OKします。

すると、
LTspice

さて、Ubuntuなどの他のLinuxOSではwineがスタートメニューからGUIで登録したアプリを起動できるようですが、Debianのパッケージインストールは依然としてCUI操作のみに対応しているようなので、起動は毎回コマンドを叩く必要があります。 今回は
LTspice
wineのパラメータ設定
デフォルトではウィンドウの解像度が低くて操作画面が見にくい状態であったり、オーディオ未設定で音声が出なかたりするので、コンソールから以下のコマンドを叩いてみます。
$ winecfg

という設定ダイアログからパラメータを設定してあげると解決するかもしれません。 (もちろんwindowsで起動するそのままを再現するほどの効果は期待できませんが...)
まとめ
以上、DebianのパッケージインストールしたwineでLTspiceを起動する方法を解説しました。
メニューにwineを追加して操作するなどのより使い勝手いい環境を求める方は、