AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-271659

Tobia's questions

Martin Hope
Tobia
Asked: 2020-05-31 08:21:00 +0800 CST

如何为 Microsoft 软件包添加 APT 密钥

  • 5

我正在尝试从Microsoft APT 存储库安装一些软件包(因为我非常讨厌 Snap!)但我似乎无法添加它的密钥:

$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
OK

它说好的,但钥匙不起作用:

$ sudo apt update
[...]
Err:7 https://packages.microsoft.com/repos/vscode stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Reading package lists... Done
W: GPG error: https://packages.microsoft.com/repos/vscode stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
E: The repository 'https://packages.microsoft.com/repos/vscode stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

我还尝试从 apt-get 打印的 NO_PUBKEY id 开始检索密钥:

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EB3E94ADBE1229CF
Executing: /tmp/apt-key-gpghome.q9IjlmqKv9/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv EB3E94ADBE1229CF
gpg: key EB3E94ADBE1229CF: "Microsoft (Release signing) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

它说“没有改变”,事实上,什么都没有改变。

如果我检查输出apt-key list我看到所有第三方密钥都有一个sub rsa4096除了微软的。这就是它不起作用的原因吗?

$ sudo apt-key list 
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2017-05-08 [SCEA]
      1EDD E2CD FC02 5D17 F6DA  9EC0 ADAE 6AD2 8A8F 901A
uid           [ unknown] Sublime HQ Pty Ltd <[email protected]>
sub   rsa4096 2017-05-08 [S]

pub   rsa4096 2016-04-12 [SC]
      EB4C 1BFD 4F04 2F6D DDCC  EC91 7721 F63B D38B 4796
uid           [ unknown] Google Inc. (Linux Packages Signing Authority) <[email protected]>
sub   rsa4096 2019-07-22 [S] [expires: 2022-07-21]

pub   rsa4096 2014-06-13 [SC]
      9FD3 B784 BC1C 6FC3 1A8A  0A1C 1655 A0AB 6857 6280
uid           [ unknown] NodeSource <[email protected]>
sub   rsa4096 2014-06-13 [E]

pub   rsa2048 2015-10-28 [SC]
      BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF
uid           [ unknown] Microsoft (Release signing) <[email protected]>

[...]

我该如何解决这个问题?

Ubuntu 20.04 焦点

keyrings apt microsoft
  • 2 个回答
  • 12272 Views
Martin Hope
Tobia
Asked: 2019-05-28 06:17:25 +0800 CST

ffmpeg h264_nvenc, "未找到支持 NVENC 的设备"

  • 4

我正在尝试让硬件编码在 ffmpeg 上工作。

我正在使用带有默认内核 (4.15.0-50.54)、ffmpeg 包 (3.4.6-0ubuntu0.18.04.1) 和 Nvidia 驱动程序 (390.116-0ubuntu0.18.04.1) 的 Ubuntu 18.04

我的硬件是带有 NVidia Quadro M500M (GM108GLM) 的联想 Thinkpad P40 Yoga,它应该具有 PureVideo HD 6 (VP6)。我没有在这张卡上找到 NVENC 支持的编解码器、像素格式、比特率和分辨率的列表,但它至少应该能够编码简单的 H264 视频。事实上,我过去曾在同一台计算机上成功使用 NVENC 和 OBS(Open Broadcaster Software)。

但是 ffmpeg 给出以下消息:

[h264_nvenc @ 0x562d21d512a0] Loaded Nvenc version 8.1
[h264_nvenc @ 0x562d21d512a0] Nvenc initialized successfully
[h264_nvenc @ 0x562d21d512a0] 1 CUDA capable devices found
[h264_nvenc @ 0x562d21d512a0] [ GPU #0 - < Quadro M500M > has Compute SM 5.0 ]
[h264_nvenc @ 0x562d21d512a0] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x562d21d512a0] No NVENC capable devices found
[h264_nvenc @ 0x562d21d512a0] Nvenc unloaded

我能做些什么来修复它?

这是完整的输出:

$ ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -vcodec h264_nvenc test.mp4 -v 56
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument 'testsrc=duration=10:size=1280x720:rate=30'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'h264_nvenc'.
Reading option 'test.mp4' ... matched as output url.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '56'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 56.
Successfully parsed a group of options.
Parsing a group of options: input url testsrc=duration=10:size=1280x720:rate=30.
Applying option f (force format) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: testsrc=duration=10:size=1280x720:rate=30.
detected 4 logical cores
[Parsed_testsrc_0 @ 0x562d21d4b660] Setting 'duration' to value '10'
[Parsed_testsrc_0 @ 0x562d21d4b660] Setting 'size' to value '1280x720'
[Parsed_testsrc_0 @ 0x562d21d4b660] Setting 'rate' to value '30'
[Parsed_testsrc_0 @ 0x562d21d4b660] size:1280x720 rate:30/1 duration:10.000000 sar:1/1
[AVFilterGraph @ 0x562d21d4a840] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed
[lavfi @ 0x562d21d498c0] All info found
[lavfi @ 0x562d21d498c0] stream 0: start_time: 0.000 duration: -307445734561825856.000
[lavfi @ 0x562d21d498c0] format: start_time: 0.000 duration: -9223372036854.775 bitrate=0 kb/s
Input #0, lavfi, from 'testsrc=duration=10:size=1280x720:rate=30':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/30: Video: rawvideo, 1 reference frame (RGB[24] / 0x18424752), rgb24, 1280x720 [SAR 1:1 DAR 16:9], 0/1, 30 tbr, 30 tbn, 30 tbc
Successfully opened the file.
Parsing a group of options: output url test.mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument h264_nvenc.
Successfully parsed a group of options.
Opening an output file: test.mp4.
[file @ 0x562d21d6d720] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x562d21d4f740] PACKET SIZE: 2764800, STRIDE: 3840
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'video_size' to value '1280x720'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'pix_fmt' to value '2'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'time_base' to value '1/30'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] Setting 'frame_rate' to value '30/1'
[graph 0 input from stream 0:0 @ 0x562d21d6f9e0] w:1280 h:720 pixfmt:rgb24 tb:1/30 fr:30/1 sar:1/1 sws_param:flags=2
[format @ 0x562d21d6e520] compat: called with args=[yuv420p|nv12|p010le|yuv444p|yuv444p16le|bgr0|rgb0|cuda]
[format @ 0x562d21d6e520] Setting 'pix_fmts' to value 'yuv420p|nv12|p010le|yuv444p|yuv444p16le|bgr0|rgb0|cuda'
[auto_scaler_0 @ 0x562d21d72da0] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x562d21d72da0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x562d21d6e520] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x562d21d6e7e0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto_scaler_0 @ 0x562d21d72da0] picking rgb0 out of 7 ref:rgb24 alpha:0
[swscaler @ 0x562d21d73b40] Forcing full internal H chroma due to input having non subsampled chroma
[auto_scaler_0 @ 0x562d21d72da0] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:rgb0 sar:1/1 flags:0x4
Loaded lib: libcuda.so.1
Loaded sym: cuInit
Loaded sym: cuDeviceGetCount
Loaded sym: cuDeviceGet
Loaded sym: cuDeviceGetName
Loaded sym: cuDeviceComputeCapability
Loaded sym: cuCtxCreate_v2
Loaded sym: cuCtxPushCurrent_v2
Loaded sym: cuCtxPopCurrent_v2
Loaded sym: cuCtxDestroy_v2
Loaded sym: cuMemAlloc_v2
Loaded sym: cuMemFree_v2
Loaded sym: cuMemcpy2D_v2
Loaded sym: cuGetErrorName
Loaded sym: cuGetErrorString
Loaded lib: libnvidia-encode.so.1
Loaded sym: NvEncodeAPICreateInstance
Loaded sym: NvEncodeAPIGetMaxSupportedVersion
[h264_nvenc @ 0x562d21d512a0] Loaded Nvenc version 8.1
[h264_nvenc @ 0x562d21d512a0] Nvenc initialized successfully
[h264_nvenc @ 0x562d21d512a0] 1 CUDA capable devices found
[h264_nvenc @ 0x562d21d512a0] [ GPU #0 - < Quadro M500M > has Compute SM 5.0 ]
[h264_nvenc @ 0x562d21d512a0] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x562d21d512a0] No NVENC capable devices found
[h264_nvenc @ 0x562d21d512a0] Nvenc unloaded
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0x562d21d6d7a0] Statistics: 0 seeks, 0 writeouts
Conversion failed!
hardware-acceleration nvidia ffmpeg h264
  • 1 个回答
  • 9038 Views
Martin Hope
Tobia
Asked: 2016-12-08 08:25:53 +0800 CST

shell 模式的制表符补全

  • 6

在我的 Debian 服务器上,我习惯于点击 Tab 来“预览”shell 模式的扩展:

$ cp *some*<Tab>
something  somewhat  have-some-cake
$ cp *some*_

当模式扩展为一个条目时,Tab 将模式替换为实际条目;否则它会显示匹配条目的列表。这是直观且有用的,因为它与常规的“前缀”制表符补全一致。

但是我的 Ubuntu 服务器和桌面的行为不同:即使它扩展到多个条目,Tab 也会用第一个条目替换模式。

我检查了通常的嫌疑人(/etc/bash.bashrc、/etc/inputrc 和本地版本),但找不到任何区别。

有人知道哪个设置控制这种行为吗?

command-line
  • 2 个回答
  • 155 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve