0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

今日のms code error:error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

Last updated at Posted at 2019-08-12

今日dockerで導入したms codeで出たエラー

docker/ubuntu
# code a.cpp
You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument.

# code a.cpp --user-data-dir /home/cpp
/usr/share/code/bin/../code: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory
docker/ubuntu
# apt search libasound     
Sorting... Done
Full Text Search... Done
libasound2/oldstable 1.1.3-5 amd64
  shared library for ALSA applications

libasound2-data/oldstable 1.1.3-5 all
  Configuration files and profiles for ALSA drivers

libasound2-dev/oldstable 1.1.3-5 amd64
  shared library for ALSA applications -- development files

libasound2-doc/oldstable 1.1.3-5 all
  documentation for user-space ALSA application programming

libasound2-plugin-equal/oldstable 0.6-7 amd64
  equalizer plugin for ALSA

libasound2-plugin-smixer/oldstable 1.1.3-5 amd64
  smixer plugin for ALSA library

libasound2-plugins/oldstable 1.1.1-1 amd64
  ALSA library additional plugins

# apt -y install libasound2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libasound2-data
Suggested packages:
  libasound2-plugins alsa-utils
The following NEW packages will be installed:
  libasound2 libasound2-data
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 669 kB of archives.
After this operation, 1981 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 libasound2-data all 1.1.3-5 [173 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libasound2 amd64 1.1.3-5 [497 kB]
Fetched 669 kB in 0s (3099 kB/s)
Selecting previously unselected package libasound2-data.
(Reading database ... 42374 files and directories currently installed.)
Preparing to unpack .../libasound2-data_1.1.3-5_all.deb ...
Unpacking libasound2-data (1.1.3-5) ...
Selecting previously unselected package libasound2:amd64.
Preparing to unpack .../libasound2_1.1.3-5_amd64.deb ...
Unpacking libasound2:amd64 (1.1.3-5) ...
Setting up libasound2-data (1.1.3-5) ...
Setting up libasound2:amd64 (1.1.3-5) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...

# code a.cpp  --user-data-dir /home/cpp

# code --help  --user-data-dir /home/cpp
Visual Studio Code 1.37.0

Usage: code [options][paths...]

To read from stdin, append '-' (e.g. 'ps aux | grep code | code -')

Options
  -d --diff <file> <file>           Compare two files with each other.
  -a --add <folder>                 Add folder(s) to the last active window.
  -g --goto <file:line[:character]> Open a file at the path on the specified line and character position.
  -n --new-window                   Force to open a new window.
  -r --reuse-window                 Force to open a file or folder in an already opened window.
  -w --wait                         Wait for the files to be closed before returning.
  --locale <locale>                 The locale to use (e.g. en-US or zh-TW).
  --user-data-dir <dir>             Specifies the directory that user data is kept in. Can be used to open multiple distinct
                                    instances of Code.
  -v --version                      Print version.
  -h --help                         Print usage.
  --telemetry                       Shows all telemetry events which VS code collects.
  --folder-uri <uri>                Opens a window with given folder uri(s)
  --file-uri <uri>                  Opens a window with given file uri(s)

Extensions Management
  --extensions-dir <dir>                            Set the root path for extensions.
  --list-extensions                                 List the installed extensions.
  --show-versions                                   Show versions of installed extensions, when using --list-extension.
  --category                                        Filters installed extensions by provided category, when using
                                                    --list-extension.
  --install-extension <extension-id | path-to-vsix> Installs or updates the extension. Use `--force` argument to avoid
                                                    prompts.
  --uninstall-extension <extension-id>              Uninstalls an extension.
  --enable-proposed-api <extension-id>              Enables proposed API features for extensions. Can receive one or more
                                                    extension IDs to enable individually.

Troubleshooting
  --verbose                          Print verbose output (implies --wait).
  --log <level>                      Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn',
                                     'info', 'debug', 'trace', 'off'.
  -s --status                        Print process usage and diagnostics information.
  --prof-startup                     Run CPU profiler during startup
  --disable-extensions               Disable all installed extensions.
  --disable-extension <extension-id> Disable an extension.
  --inspect-extensions <port>        Allow debugging and profiling of extensions. Check the developer tools for the connection
                                     URI.
  --inspect-brk-extensions <port>    Allow debugging and profiling of extensions with the extension host being paused after
                                     start. Check the developer tools for the connection URI.
  --disable-gpu                      Disable GPU hardware acceleration.
  --max-memory                       Max memory size for a window (in Mbytes).

参考資料

ubuntuパッケージ管理centosとの対比備忘録
https://qiita.com/smallpalace/items/57bf018909644e7c3e70

実行ファイルが動かなくて困っている時に行う対応方法レシピ (REDHAT系)
https://confluence.sharuru07.jp/pages/viewpage.action?pageId=360736

CentOS7で実行ファイルの不足している依存関係を解消する(CentOS7でElectronが試せない話に関連して)
https://qiita.com/one-kelvin/items/07bf9b99288e8ecfa4a2

Ethernet 記事一覧 Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

Wireshark 一覧 wireshark(0)、Ethernet(48)
https://qiita.com/kaizen_nagoya/items/fbed841f61875c4731d0

線網(Wi-Fi)空中線(antenna)(0) 記事一覧(118/300目標)
https://qiita.com/kaizen_nagoya/items/5e5464ac2b24bd4cd001

C++ Support(0) 
https://qiita.com/kaizen_nagoya/items/8720d26f762369a80514

Coding Rules(0) C Secure , MISRA and so on
https://qiita.com/kaizen_nagoya/items/400725644a8a0e90fbb0

Autosar Guidelines C++14 example code compile list(1-169)
https://qiita.com/kaizen_nagoya/items/8ccbf6675c3494d57a76

Error一覧(C/C++, python, bash...) Error(0)
https://qiita.com/kaizen_nagoya/items/48b6cbc8d68eae2c42b8

なぜdockerで機械学習するか 書籍・ソース一覧作成中 (目標100)
https://qiita.com/kaizen_nagoya/items/ddd12477544bf5ba85e2

言語処理100本ノックをdockerで。python覚えるのに最適。:10+12
https://qiita.com/kaizen_nagoya/items/7e7eb7c543e0c18438c4

プログラムちょい替え(0)一覧:4件
https://qiita.com/kaizen_nagoya/items/296d87ef4bfd516bc394

一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

小川清最終講義、小川清最終講義(再)計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?