Ubuntu の WeChat/QQ メソッドのインストール:
https://zhuanlan.zhihu.com/p/96530693
GIithub WeChat メソッドの追加
Github QQ メソッドの追加
QQ、WeChat、chrome、Sogou 入力メソッドを ubuntu にインストールする方法
https://jingyan.baidu.com/article/a3aad71a1c81b0b1fa009677.html
Ubuntu に deb パッケージをインストールするには、dpkg コマンドを使用する必要があります。
Dpkg 的普通用法:
1、sudo dpkg -i <package.deb>
安装一个 Debian 软件包,如你手动下载的文件。
2、sudo dpkg -c <package.deb>
列出 <package.deb> 的内容。
3、sudo dpkg -I <package.deb>
从 <package.deb> 中提取包裹信息。
4、sudo dpkg -r <package>
移除一个已安装的包裹。
5、sudo dpkg -P <package>
完全清除一个已安装的包裹。和 remove 不同的是,remove 只是删掉数据和可执行文件,purge 另外还删除所有的配制文件。
6、sudo dpkg -L <package>
列出 <package> 安装的所有文件清单。同时请看 dpkg -c 来检查一个 .deb 文件的内容。
7、sudo dpkg -s <package>
显示已安装包裹的信息。同时请看 apt-cache 显示 Debian 存档中的包裹信息,以及 dpkg -I 来显示从一个 .deb 文件中提取的包裹信息。
8、sudo dpkg-reconfigure <package>
重新配制一个已经安装的包裹,如果它使用的是 debconf (debconf 为包裹安装提供了一个统一的配制界面)。
如果安装过程中出现问题,可以先使用命令:
sudo apt-get update
更新后再执行上面的命令
ファイルの内容を変更する Linux コマンド
1. ファイルを入力します: vim ファイル名
例: #vim /etc/httpd/httpd.conf
2. 変更するコンテンツの場所を見つけます。
(1) ファイルをクエリ可能にするために、shift+":"
(2) / + クエリ内容を入力します (例: クエリ ディレクトリ パラメータ、つまり /Directory)
たとえば、Directory パラメータを見つけて、「すべて拒否」をコメントアウトし、「すべて許可」を追加します。
3. 位置を見つけたら変更します。キーボードの i キーを押して編集可能にします。
4. ファイルの内容を変更した後、ESC キーを押して終了します。
5. 変更を保存します。
(1) ファイルをクエリ可能にするために、shift+":"
(2)wqに参戦!
6. 変更を保存しないでください。
(1) ファイルをクエリ可能にするために、shift+":"
(2)qを入力!
Nvidia Geforce MX150 グラフィックス ドライバーをインストールする
参考リンク:https://blog.csdn.net/weixin_43820996/article/details/100676292
参考リンク:https://blog.csdn.net/qq_43030766/article/details/91513501
1. BIOS のセキュアブートを無効にする
2.ヌーボーを無効にする
(1) ファイルを作成します。vim エディターがインストールされていない場合は、vim を gedit に置き換えることができます。
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
(2) ファイルを開いた後、次の内容を挿入して、デフォルトでは有効になっていない nouveau をブラックリストに追加します。
blacklist nouveau
options nouveau modeset=0
(3) 最後に以下のコマンドを入力して無効化を有効にし、再起動します。
sudo update-initramfs -u
sudo reboot
(4) 再起動後の確認
lsmod | grep nouveau
Enterを押しても応答がない場合は、無効化が有効になります。
3. ミラーソース (清華ソース) を追加します。
ソースを見る
sudo gedit /etc/apt/sources.list
バックアップソース
sudo cp /etc/apt/sources.list sources.list /etc/apt/sources.list sources.list_backup
# cp 改为mv为剪切
バックアップ後、ソースファイルを次のいずれかに置き換えます。
#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#阿里源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#网易:
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
#中国科学技术大学
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main restricted
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main restricted
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security multiverse
追加後に更新する
sudo apt-get update
4.グラフィックスカードドライバーをインストールする
(1) まず、以前にインストールされていたグラフィックドライバーを完全にアンインストールします。
ppa ソース ファイルのアンインストール:
sudo apt-get remove --purge nvidia*
Runfile ソース ファイルのアンインストール:
sudo ./NVIDIA-Linux-x86_64-384.59.run --uninstall
#"/"后面的为旧显卡驱动版本,可在终端通过:nvidia-smi“查询
(2) PPA ソース ドライバーのインストール (最も簡単なインストール方法)
コンピューター グラフィックス カードに最適なドライバーのバージョンを照会します。
ubuntu-drivers devices
コマンドラインからインストールする
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-driver-440 #此处数字要对应上面查询到的版本号,安装推荐安装的驱动版本
sudo apt-get install mesa-common-dev
注: セキュア ブートを以前に無効にしていない場合は、インストール プロセス中にパスワードの設定を求めるプロンプトが表示されます。再起動時に、セキュア ブートを無効にするためにパスワード検証を入力する必要があります。再起動後、ブルー スクリーンが表示されます。この時点では続行を直接選択することはできませんが、 ボタンを押して MOK の登録を選択し、確認後の次のオプションで続行を選択し、ドライバーのインストール時に設定したパスワードを入力してマシンを起動する必要があります。
(3) インストール後の再起動
sudo reboot
(4) 再起動後、端末で確認する
nvidia-smi
**
**
CUDAをインストールする
tensorflow に対応する CUDA および CUDNN のバージョン要件:
https://tensorflow.google.cn/install/source
1. NVIDIA ドライバーに対する CUDA の要件:
公式ウェブサイト: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#title-new-cuda-tools
2. cuda インストールパッケージをダウンロードしてインストールします
CUDA ダウンロード公式 Web サイト: https://developer.nvidia.com/cuda-toolkit-archive
(1) 公式 Web サイトの操作プロンプトに従ってダウンロードしてインストールします。ここでは CUDA10.0 を選択します (cudnn がサポートする最新バージョンは CUDA10.1 です) )、CUDA10.0 バージョン 具体的なオプションは次のとおりです:
(2) 2 つのパッケージをダウンロードします
。 (3) ダウンロードが完了したら、ダウンロードしたファイルがあるフォルダーを開き、右クリックして [ターミナルを開く] を選択し、指示に従います。公式ウェブサイトのインストール手順
sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
(4)インストール中に依存関係の問題がある場合は、まず aptitude をインストールし、次に sudo aptitude install cuda を使用してインストールします。aptitude をインストールし
、インストール プロセス中に「はい/いいえ」を選択し、y を選択します。
sudo apt-get install aptitude
aptitudeをインストールしたらcudaをインストールします
sudo aptitude install cuda
3. 環境変数を追加する
sudo gedit ~/.bashrc
開いたファイルの後に次の 3 行のコードを追加します。
export PATH=/usr/local/cuda-10.0/bin${
PATH:+:${
PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${
LD_LIBRARY_PATH:+:${
LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
4. インストールを確認する
ソース ファイルを更新し、CUDA がインストールされていることを確認します
source ~/.bashrc
nvcc --version
cat /usr/local/cuda/version.txt
図に示すように、インストールは成功しました
5. cuda10.0のパッチパッケージを直接インストール可能
sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-nvjpeg-update-1_1.0-1_amd64.deb
sudo apt-get update
cuDNNをインストールする
公式サイトダウンロードリンク:https://developer.nvidia.com/rdp/cudnn-archive
参考リンク:https://blog.csdn.net/qq_43030766/article/details/91513501
1. 公式Webサイトを開き、対応するパッケージを選択し、インストールパッケージをダウンロードします
次の 3 つのパッケージをダウンロードすることを選択します
2. ダウンロードした 3 つのパッケージを次の順序でインストールします。
(1) 3つのパッケージが置かれているフォルダでターミナルを開き、以下のインストールコマンドの順にインストールします。
sudo dpkg -i libcudnn7_7.6.5.32-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.6.5.32-1+cuda10.0_amd64_2.deb
sudo dpkg -i libcudnn7-doc_7.6.5.32-1+cuda10.0_amd64.deb
(2) 2 番目のパッケージをインストールするときはパスに注意してください。「自動モードで /usr/include/cudnn.h(libcudnn) を提供します」
cudnn.h ファイルを /usr/local/cuda/include フォルダーにコピーします。権限を変更します。
sudo cp /usr/include/cudnn.h /usr/local/cuda/include
sudo chmod a+x /usr/local/cuda/include/cudnn.h
(3) インストールが成功したか確認する
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
図に示すように、インストールは成功しました
tensorflow をインストールする
pip3 install tensorflow-gpu