config.fishで自動起動化したGNU screenでbashのコマンドが見えなくなる
seabornがインストールできない
実行環境
seabornがインストールできない
$ sudo pip install seaborn --no-cache-dir
pipでseabornをインストールしようとすると,AttributeError: 'module' object has no attribute '_base'
といわれてerrorになってしまった.
beautifulsoup4を更新
beautifulsoup4とhtml5libを更新(またはインストール)すると直る.
おそらく,beautifulsoup4だけで直る.
$ sudo pip install --upgrade beautifulsoup4 $ sudo pip insatll --upgrade html5lib
LOG
pi@raspberrypi:~ $ sudo pip install seaborn --no-cache-dir Collecting seaborn Downloading seaborn-0.8.1.tar.gz (178kB) 100% |████████████████████████████████| 184kB 3.1MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-oPGq1l/seaborn/setup.py", line 66, in <module> install_requires = check_dependencies() File "/tmp/pip-build-oPGq1l/seaborn/setup.py", line 58, in check_dependencies import pandas File "/usr/lib/python2.7/dist-packages/pandas/__init__.py", line 45, in <module> from pandas.io.api import * File "/usr/lib/python2.7/dist-packages/pandas/io/api.py", line 10, in <module> from pandas.io.html import read_html File "/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 25, in <module> import bs4 File "/usr/lib/python2.7/dist-packages/bs4/__init__.py", line 30, in <module> from .builder import builder_registry, ParserRejectedMarkup File "/usr/lib/python2.7/dist-packages/bs4/builder/__init__.py", line 311, in <module> from . import _html5lib File "/usr/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 57, in <module> class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder): AttributeError: 'module' object has no attribute '_base' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-oPGq1l/seaborn/ pi@raspberrypi:~ $ sudo pip install --upgrade beautifulsoup4 --no-cache-dir Collecting beautifulsoup4 Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB) 100% |████████████████████████████████| 92kB 1.9MB/s Installing collected packages: beautifulsoup4 Found existing installation: beautifulsoup4 4.3.2 DEPRECATION: Uninstalling a distutils installed project (beautifulsoup4) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling beautifulsoup4-4.3.2: Successfully uninstalled beautifulsoup4-4.3.2 Successfully installed beautifulsoup4-4.6.0 pi@raspberrypi:~ $ sudo pip install seaborn --no-cache-dirCollecting seaborn Downloading seaborn-0.8.1.tar.gz (178kB) 100% |████████████████████████████████| 184kB 2.8MB/s Installing collected packages: seaborn Running setup.py install for seaborn ... done Successfully installed seaborn-0.8.1
libpng12-devとlibpng-devが競合してインストールできない
libpng12-devとlibpng-devの競合
解決策
apt install --reinstall
でごり押し
LOG
$ sudo apt install libpng12-dev インストールすることができないパッケージがありました。おそらく、あり得 ない状況を要求したか、(不安定版ディストリビューションを使用しているの であれば) 必要なパッケージがまだ作成されていなかったり Incoming から移 動されていないことが考えられます。 以下の情報がこの問題を解決するために役立つかもしれません: 以下のパッケージには満たせない依存関係があります: libpng-dev : 競合: libpng12-dev しかし、1.2.54-6 はインストールされようとしています libpng12-dev : 競合: libpng-dev しかし、1.6.28-1 はインストールされようとしています E: エラー、pkgProblemResolver::Resolve は停止しました。おそらく変更禁止パッケージが原因です。 $ sudo apt install --reinstall libpng12-dev # SUCCESS
Raspberry Piで既知のステルスSSIDに繋げる
実行環境
ラズベリーパイ
Raspberry Pi2 Model B
Raspberry Pi3 Model B
ステルス SSIDに繋げる
WPA-PSKのパスフレーズを暗号化する
$ wpa_passphrase [SSID] [PassPhrase]
ついでに/etc/wpa_supplicant/wpa_supplicant.conf
に追記してしまいたい
直接コピペしてもいいが,コマンドで済ませてしまいたい人は以下のコマンドで
$ wpa_passphrase [SSID] [PassPhrase] | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
/etc/wpa_supplicant/wpa_supplicant.confに追記する
先ほど得たSSID,暗号化パスフレーズとscan_ssid=1
を以下のように追記する.
network={ ssid="myssid" scan_ssid=1 psk=XX00XX00XX00XX }
参考資料
ログインシェルの変更
実行環境
Ubuntu
ほかは覚えてない、すまん
ログインシェルの変更
chsh -s [shell]
を使う。
あらかじめ,実行ファイル位置を確認する.
$ which zsh
/usr/bin/zsh
$ chsh -s /usr/bin/zsh
パスワード: ***
chsh: /usr/bin/zsh はシェルに指定できません
chshでシェルが指定できないとき
解決案: /etc/shells
にzshを追記
ログインシェルに指定できるのは/etc/shells
に記載されているシェルだけだ、ということ。なので追記。
# /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash /usr/bin/zsh
$ chsh -s /usr/bin/zsh パスワード: *** chsh: ユーザ konafx は /etc/passwd に存在しません
ユーザが/etc/passwdに存在しないとき
解決案: /etc/passwd
に追記
UNIXで、ユーザの管理をつかさどっているのは、/etc/passwd という名前のファイルです。このファイルは、大変に重要なファイルで、これが無くなると、誰もUNIXにログインできなくなります。 このファイルには、ユーザがログインする際に必要なユーザ名や、ホームディレクトリなど、各種の設定が書かれています。
(略)
/etc/passwd ファイルは、1行が1人のユーザに対応しており、このファイルの1行は、:(コロン)で区切られた、次のようなフィールドからなります。 第1フィールド: ユーザ名(ログイン名) 第2フィールド: (暗号化パスワード) 第3フィールド: ユーザ番号(UID) 第4フィールド: グループ番号(GID) 第5フィールド: コメントフィールド(名前など) 第6フィールド: ホームディレクトリーのパス 第7フィールド: ログイン・シェル
ということなので、こいつに新たに書き込んでいく。 必要な情報は
を見ればわかる。または$ id
で出てくる.なお暗号化パスワードは"x"でいいらしい。
(略) konafx:x:ユーザ番号:グループ番号:konafx,,,:ホームディレクトリ:/usr/bin/zsh
書き換えたらおわり。
上記のように直接ログインシェルを変えたいものにしてもいいし、あとでchshしてもいい。 どちらにせよ要再起動