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-578855

Run's questions

Martin Hope
Run
Asked: 2023-11-21 17:57:22 +0800 CST

递归重命名图像/文件?

  • 5

如何递归地重命名图像/文件?例如:

folder
- subfolder1
   - a-copy.jpg
- subfolder2
   - b-copy.jpg
- subfolder3
   - c-copy.jpg

我想得到:

folder
- subfolder1
   - a-thumb.jpg
- subfolder2
   - b-thumb.jpg
- subfolder3
   - c-thumb.jpg

我试过:

for i in $(find . -iname '*.jpg') ; do rename 's/-copy/-thumb/' *.jpg; done

当然不行!任何想法?

command-line
  • 1 个回答
  • 61 Views
Martin Hope
Run
Asked: 2023-11-21 16:03:53 +0800 CST

递归查找图像、复制、重命名和调整大小?

  • 5

如何递归地查找图像并使用新名称将它们复制到自己的目录中?例如:

folder
- subfolder1
   - a.jpg
- subfolder2
   - b.jpg
- subfolder3
   - c.jpg

所以我可以得到:

folder
- subfolder1
   - a.jpg
   - a-copy.jpg
- subfolder2
   - b.jpg
   - b-copy.jpg
- subfolder3
   - c.jpg
   - c-copy.jpg

理想情况下,我想将复制的图像大小调整为最大宽度 50 像素(比原始图像小)。

有任何想法吗?

command-line
  • 1 个回答
  • 66 Views
Martin Hope
Run
Asked: 2022-02-03 22:29:28 +0800 CST

在 Ubuntu 20.04 中为 Python 2.7 安装 python-mysqldb - 未满足的依赖项

  • 1

我正在尝试在 Ubuntu 20.04 中为 Python 2.7 安装 python-mysqldb:

$ sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main'
$ sudo apt update
$ sudo apt install -y python-mysqldb

我收到以下错误:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-mysqldb : Depends: python (< 2.8)
                  Depends: python (>= 2.7~)
                  Depends: python:any (< 2.8)
                  Depends: python:any (>= 2.7.5-5~)
E: Unable to correct problems, you have held broken packages.

知道如何解决吗?

我的 Ubuntu 20.04 中安装了 Python 2.7.18 和 Python 3

apt
  • 1 个回答
  • 686 Views
Martin Hope
Run
Asked: 2019-10-14 14:47:56 +0800 CST

找不到蓝牙适配器 Ubuntu 19.04

  • 2

我的蓝牙适配器突然消失了,我一直在尝试修复它,但没有成功。

我已尝试启用或重新启动它,但它的状态仍然是inactive。

~$ sudo systemctl enable bluetooth
Synchronizing state of bluetooth.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable bluetooth

~$ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
  Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
  Active: inactive (dead)
    Docs: man:bluetoothd(8)

Oct 14 00:33:19 lau-desktop systemd[1]: Condition check resulted in Bluetooth service being skipped.
Oct 14 00:34:27 lau-desktop systemd[1]: Condition check resulted in Bluetooth service being skipped.
Oct 14 00:34:43 lau-desktop systemd[1]: Condition check resulted in Bluetooth service being skipped.
Oct 14 00:37:36 lau-desktop systemd[1]: Condition check resulted in Bluetooth service being skipped.

我还可以做些什么?

bluetooth 19.04
  • 1 个回答
  • 3764 Views
Martin Hope
Run
Asked: 2019-03-10 10:12:31 +0800 CST

ffmpeg concats .VOB 文件 - 声音丢失?

  • 1

我使用 ffmpeg 连接我的 .VOB 文件。它将它们合并。但是组合后完全没有声音:

ffmpeg -i 'concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB|VTS_01_5.VOB|VTS_01_6.VOB|VTS_01_7.VOB' -acodec copy -vcodec copy combined.mpg

有任何想法吗?

编辑:

我的终端输出:

ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 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
  WARNING: library configuration mismatch
  avcodec     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 --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  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
Input #0, mpeg, from 'concat:/home/lau/Desktop/merge/VTS_02_1.VOB|/home/lau/Desktop/merge/VTS_02_2.VOB':
  Duration: 00:40:34.30, start: 0.287267, bitrate: 7056 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s
    Stream #0:3[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
[mpeg @ 0x55aa4a6e7180] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification                                 
Like DVD, VCD or others, make sure you set the correct buffer size                              
[mpeg @ 0x55aa4a6e7180] ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream.                                         
Output #0, mpeg, to '/home/lau/Desktop/merge/combined.mpg':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:3 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpeg @ 0x55aa4a6e7180] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpeg @ 0x55aa4a68b900] New subtitle stream 0:4 at pos:125679630 and DTS:189.367s
frame= 6805 fps=0.0 q=-1.0 size=  193188kB time=00:04:32.12 bitrate=5815.8kbits/s speed= 544x   frame=12253 fps=12253 q=-1.0 size=  397130kB time=00:08:10.04 bitrate=6638.8kbits/s speed= 490x frame=18133 fps=12088 q=-1.0 size=  589072kB time=00:12:05.24 bitrate=6653.9kbits/s speed= 483x frame=24516 fps=12257 q=-1.0 size=  787674kB time=00:16:20.56 bitrate=6580.6kbits/s speed= 490x frame=30390 fps=12155 q=-1.0 size=  984682kB time=00:20:15.52 bitrate=6636.3kbits/s speed= 486x frame=36349 fps=12116 q=-1.0 size= 1183140kB time=00:24:13.88 bitrate=6666.5kbits/s speed= 485x frame=41952 fps=11986 q=-1.0 size= 1375214kB time=00:27:58.00 bitrate=6713.8kbits/s speed= 479x frame=48039 fps=12009 q=-1.0 size= 1562378kB time=00:32:01.48 bitrate=6661.0kbits/s speed= 480x frame=54193 fps=12042 q=-1.0 size= 1754286kB time=00:36:07.64 bitrate=6629.8kbits/s speed= 482x frame=60008 fps=12001 q=-1.0 size= 1944828kB time=00:40:00.24 bitrate=6637.7kbits/s speed= 480x frame=60862 fps=12009 q=-1.0 Lsize= 1969864kB time=00:40:34.40 bitrate=6628.8kbits/s speed= 480x    
video:1827970kB audio:133124kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.447200%
ffmpeg
  • 1 个回答
  • 1513 Views
Martin Hope
Run
Asked: 2018-10-08 05:37:35 +0800 CST

Kubuntu 18.04 升级破坏了 MongoDB 服务器?

  • 1

升级到 Ubuntu/Kubuntu 18.04 后似乎破坏了我的 MongoDB 服务器。

我试图重新安装 Mongo,但我仍然无法像以前一样启动它:

$ sudo apt-get install mongodb-server
$ mongo --version
MongoDB shell version v3.6.3
git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
OpenSSL version: OpenSSL 1.1.0h  27 Mar 2018
allocator: tcmalloc
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64

状态:

$ sudo service mongodb status
● mongodb.service - An object/document-oriented database
   Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-10-07 14:30:40 BST; 17s ago
     Docs: man:mongod(1)
  Process: 5925 ExecStart=/usr/bin/mongod --unixSocketPrefix=${SOCKETPATH} --config ${CONF} $DAEMON_OPTS (code=exited, status=62)
 Main PID: 5925 (code=exited, status=62)

Oct 07 14:30:38 lau-desktop systemd[1]: Started An object/document-oriented database.
Oct 07 14:30:40 lau-desktop systemd[1]: mongodb.service: Main process exited, code=exited, status=62/n/a
Oct 07 14:30:40 lau-desktop systemd[1]: mongodb.service: Failed with result 'exit-code'.

有任何想法吗?

编辑:

当我尝试安装 mongo 4 时,出现错误:

Preparing to unpack .../mongodb-org-server_4.0.3_amd64.deb ...
Unpacking mongodb-org-server (4.0.3) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.0.3_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.0.3_amd64.deb ...
Unpacking mongodb-org-mongos (4.0.3) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.0.3_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-tools_4.0.3_amd64.deb ...
Unpacking mongodb-org-tools (4.0.3) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.0.3_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-server_4.0.3_amd64.deb
 /var/cache/apt/archives/mongodb-org-mongos_4.0.3_amd64.deb
 /var/cache/apt/archives/mongodb-org-tools_4.0.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

编辑2:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 mongodb-org : Depends: mongodb-org-server but it is not installed
               Depends: mongodb-org-mongos but it is not installed
               Depends: mongodb-org-tools but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

编辑 3:

$ mongo --versionMongoDB shell version v4.0.3
git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
OpenSSL version: OpenSSL 1.1.0h  27 Mar 2018
allocator: tcmalloc
modules: none
build environment:
    distmod: ubuntu1804
    distarch: x86_64
    target_arch: x86_64

$ sudo service mongodb status
● mongodb.service
   Loaded: masked (/dev/null; bad)
   Active: failed (Result: exit-code) since Sun 2018-10-07 15:12:14 BST; 1h 7min ago
 Main PID: 2232 (code=exited, status=62)

Oct 07 15:12:13 lau-desktop systemd[1]: Started An object/document-oriented database.
Oct 07 15:12:14 lau-desktop systemd[1]: mongodb.service: Main process exited, code=exited, status=62/n/a
Oct 07 15:12:14 lau-desktop systemd[1]: mongodb.service: Failed with result 'exit-code'.
kubuntu mongodb 18.04
  • 2 个回答
  • 4224 Views
Martin Hope
Run
Asked: 2018-02-25 14:23:54 +0800 CST

midori/ppa - 不能永远删除它吗?

  • 0

我安装了midori:

$ sudo add-apt-repository --remove ppa:midori/ppa

但它在 Ubuntu 17.10 上不起作用,所以我必须删除它:

$ sudo ppa-purge ppa:midori/ppa
Updating packages lists
E: The repository 'http://ppa.launchpad.net/midori/ppa/ubuntu artful Release' does not have a Release file.
Warning:  apt-get update failed for some reason

知道为什么我不能删除它吗?

我努力了:

$ sudo add-apt-repository --remove ppa:midori/ppa

但仍然没有运气。

有任何想法吗?

编辑:

如果我这样做:

$ sudo add-apt-repository --remove ppa:midori/ppa

我得到:

 Midori Browser
    http://twotoasts.de/index.php/midori/

This PPA is signed. To add the GPG key to your apt keyring:
   sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A69241F1
Starting with Karmic, adding the PPA and its key is as simple as:
   sudo add-apt-repository ppa:midori

You may also want to use the WebKit-team PPA:
     https://launchpad.net/~webkit-team/+archive/ppa
You can find unstable Midori versions at
    https://launchpad.net/~midori/+archive/midori-dev
 More info: https://launchpad.net/~midori/+archive/ubuntu/ppa
Press [ENTER] to continue or Ctrl-c to cancel removing it.

它没有任何意义!

ppa apt midori
  • 1 个回答
  • 1024 Views
Martin Hope
Run
Asked: 2017-10-25 08:39:39 +0800 CST

Ubuntu 17.10 - 升级后无法拾取蓝牙设备

  • 4

将我的 Kubuntu 从 17.04 升级到 17.10 后,它无法再接收任何 bt 设备。

我尝试对我的 bt 键盘、bt 鼠标、bt 扬声器和 android 手机进行 bt。它们都没有显示在下面的窗口中:

在此处输入图像描述

我试过了:

$ lspci -nnk | grep -iA2 net; lsusb; hciconfig -a; dmesg | egrep -i 'blue|firm'

我得到:

00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-LM [8086:15b7] (rev 31)
        Subsystem: Intel Corporation Ethernet Connection (2) I219-LM [8086:2064]
        Kernel driver in use: e1000e
        Kernel modules: e1000e
--
03:00.0 Network controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)
        Subsystem: Intel Corporation Wireless 8260 [8086:9010]
        Kernel driver in use: iwlwifi
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
hci0:   Type: Primary  Bus: USB
        BD Address: A0:C5:89:53:76:62  ACL MTU: 1021:4  SCO MTU: 96:6
        UP RUNNING PSCAN ISCAN 
        RX bytes:29930 acl:0 sco:0 events:362 errors:0
        TX bytes:5214 acl:0 sco:0 commands:74 errors:0
        Features: 0xbf 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH SNIFF 
        Link mode: SLAVE ACCEPT 
        Name: 'Bluemoon Universal Bluetooth Host Controller'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous, 
        HCI Version: 4.2 (0x8)  Revision: 0x100
        LMP Version: 4.2 (0x8)  Subversion: 0x100
        Manufacturer: Intel Corp. (2)

[    0.114205] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    1.602781] [drm] Finished loading DMC firmware i915/skl_dmc_ver1_26.bin (v1.26)
[    2.341734] Bluetooth: Core ver 2.22
[    2.341744] Bluetooth: HCI device and connection manager initialized
[    2.341746] Bluetooth: HCI socket layer initialized
[    2.341748] Bluetooth: L2CAP socket layer initialized
[    2.341752] Bluetooth: SCO socket layer initialized
[    2.349179] Bluetooth: HCI UART driver ver 2.3
[    2.349180] Bluetooth: HCI UART protocol H4 registered
[    2.349181] Bluetooth: HCI UART protocol BCSP registered
[    2.349194] Bluetooth: HCI UART protocol LL registered
[    2.349194] Bluetooth: HCI UART protocol ATH3K registered
[    2.349195] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.349212] Bluetooth: HCI UART protocol Intel registered
[    2.349224] Bluetooth: HCI UART protocol Broadcom registered
[    2.349224] Bluetooth: HCI UART protocol QCA registered
[    2.349225] Bluetooth: HCI UART protocol AG6XX registered
[    2.349225] Bluetooth: HCI UART protocol Marvell registered
[    2.352194] Bluetooth: hci0: Firmware revision 0.0 build 118 week 50 2016
[    2.417815] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2
[    2.417946] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2
[    2.421670] iwlwifi 0000:03:00.0: loaded firmware version 31.532993.0 op_mode iwlmvm
[    2.523935] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.523936] Bluetooth: BNEP filters: protocol multicast
[    2.523938] Bluetooth: BNEP socket layer initialized
[    4.595293] Bluetooth: RFCOMM TTY layer initialized
[    4.595298] Bluetooth: RFCOMM socket layer initialized
[    4.595301] Bluetooth: RFCOMM ver 1.11
[   29.148960] Bluetooth: Failed to disable LE scan: status 0x0c

有什么想法吗?我怎样才能解决这个问题?

kubuntu
  • 1 个回答
  • 2621 Views
Martin Hope
Run
Asked: 2017-07-10 10:53:58 +0800 CST

特定时间的每日 cron 任务?[复制]

  • 1
这个问题在这里已经有了答案:
如何设置 Cron 作业? (8 个回答)
5年前关闭。

我想每天运行一个命令,但我不确定如何正确使用 cron 任务。

我知道这是我需要知道的代码:

* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)

如果我这样做,* * * * *这意味着它每分钟运行一次,对吗?

每天怎么样,特别是each day at 1AM?

这是0 0 * * *每天运行命令吗?

cron
  • 1 个回答
  • 1302 Views
Martin Hope
Run
Asked: 2017-05-28 20:12:10 +0800 CST

17.04 的最新内核是什么?4.10.0-21-通用?[复制]

  • 0
这个问题在这里已经有了答案:
如何检查存储库中软件包的可用版本? (7 个回答)
4年前关闭。

我在 Kubuntu 17.04 上。我想知道 - 我如何检查我是否使用最新的内核?

我在终端中输入:

$ uname -r
4.10.0-21-generic

那么它是最新的内核吗?如果没有,我怎样才能将其更新到最新版本?

kernel
  • 1 个回答
  • 2370 Views
Martin Hope
Run
Asked: 2017-05-20 11:33:53 +0800 CST

Apache config - 如何启用其他端口

  • 4

安装 mu LAMP 堆栈后。我在 http://127.0.1.1/ 默认运行端口 80

现在我想添加新的端口,例如 8000、8888。

如何在我的 Ubuntu 17.04 的 /etc/apache2/apache2.conf 中添加它们?

这就是我在Arch Linux中的做法:

2.2 在 /etc/httpd/conf/httpd.conf 中,取消对 Proxy 的以下两行的注释:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

2.3 不要忘记在 /etc/httpd/conf/httpd.conf 中添加端口 443 到您的监听端口:

Listen 443
Listen 8888

2.3 添加这些块:

<VirtualHost *:8888>
    ProxyPreserveHost On
    ProxyRequests Off
    ServerName www.xxxx.co.uk
    ServerAlias xxxx.co.uk
    ProxyPass / http://127.0.0.1:3838/
    ProxyPassReverse / http://127.0.0.1:3838/

    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/xxxx.co.uk/fullchain.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/xxxx.co.uk/privkey.pem"
</VirtualHost>

Ubuntu 中的 Apache 怎么样?

我什至没有看到:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

在我的 Ubuntu 17.04 中的 apache2.conf 中。

server
  • 1 个回答
  • 29885 Views
Martin Hope
Run
Asked: 2017-05-19 05:50:09 +0800 CST

Bower 错误: bower ESUDO 不能用 sudo 运行?

  • 1

我在 Ubuntu 17.04 上。不确定我是否安装了凉亭:

$ sudo npm install -g bower

/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
/usr/lib
└── [email protected] 

当我尝试检查并收到错误时:

$ bower -V
bower ESUDO         Cannot be run with sudo

Additional error details:                                                                                                                                                         
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

Stack trace:
Error: Cannot be run with sudo
    at createError (/usr/lib/node_modules/bower/lib/util/createError.js:4:15)
    at rootCheck (/usr/lib/node_modules/bower/lib/util/rootCheck.js:26:24)
    at Object.<anonymous> (/usr/lib/node_modules/bower/lib/bin/bower.js:33:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

Console trace:
Error
    at StandardRenderer.error (/usr/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
    at rootCheck (/usr/lib/node_modules/bower/lib/util/rootCheck.js:26:18)
    at Object.<anonymous> (/usr/lib/node_modules/bower/lib/bin/bower.js:33:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
System info:
Bower version: 1.8.0
Node version: 7.10.0
OS: Linux 4.9.15-x86_64-linode81 x64

当我尝试使用我的程序安装软件包时,我也会收到错误:

[localhost] local: bower install
bower ESUDO         Cannot be run with sudo

Additional error details:                                                                                                                                                         
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

Fatal error: local() encountered an error (return code 1) while executing 'bower install'

Aborting.

有什么想法可以解决这个问题吗?

permissions
  • 1 个回答
  • 3630 Views
Martin Hope
Run
Asked: 2017-05-19 04:19:10 +0800 CST

尝试安装 Python 2.7 后更新错误?

  • 0

尝试在我的 Ubuntu 17.04 中安装 Python 2.7 后:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:fkrull/deadsnakes

每当我运行更新时,我就开始出现错误:

$ sudo apt-get update

sudo apt-get update           
Get:1 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Ign:2 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty InRelease                                                 
Ign:3 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty Release                                                   
Hit:4 http://mirrors.linode.com/ubuntu zesty InRelease                 
Hit:5 http://mirrors.linode.com/ubuntu zesty-updates InRelease
Hit:6 http://mirrors.linode.com/ubuntu zesty-backports InRelease
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Err:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
  404  Not Found
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Hit:12 https://deb.nodesource.com/node_7.x zesty InRelease
Fetched 89.2 kB in 0s (129 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu/dists/zesty/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

任何想法为什么?如何解决这个问题?

这些是我猜的错误:

Err:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
  404  Not Found
W: The repository 'http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu/dists/zesty/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
python
  • 1 个回答
  • 1709 Views
Martin Hope
Run
Asked: 2017-05-17 03:20:34 +0800 CST

Ubuntu 17.04 上带有 Windows 10 的虚拟机

  • 0

我已经完全停止使用 Windows,我的机器只在 Linux/Ubuntu 上运行。我根本不使用 VM。

我想知道是否可以在我的 Ubuntu 上安装带有 Windows 10 的 VM?我是否需要 Windows 10 的完整许可证副本才能在 VM 中运行它?

windows-10
  • 2 个回答
  • 675 Views
Martin Hope
Run
Asked: 2017-05-02 12:54:16 +0800 CST

如何从其官方网站安装最新的 FileZilla?

  • 1

如何从其官方网站安装最新的 FileZilla ?

我可以从我的软件中心找到 FileZilla 并安装它。但它是 3.24.0 版本。而最新的是 3.25.2。

我可以将已经安装的 3.24.0 版本升级到 3.25.2 吗?

我一直想知道如何从其官方站点安装,但它不是 .deb。它看起来像您需要编译或构建的 FileZilla 的源文件。但是我该怎么做呢?

有任何想法吗?

这是来自网站,但对我来说不是很有帮助:

在 GNU/Linux 和其他 Unix(-like) 系统上安装

建议您使用发行版的包管理器。如果您使用的是 GNU/Linux,您也可以尝试使用预编译的二进制文件。将文件解压到任意位置(位置无关紧要,FileZilla 可以检测到自己的安装前缀)后,您可以使用 bin/ 子目录中的 filezilla 可执行文件启动程序。请注意,由于发行版的差异,提供的二进制文件可能无法在您的系统上运行。或者,您也可以从源代码编译 FileZilla。

ftp
  • 1 个回答
  • 2266 Views
Martin Hope
Run
Asked: 2017-04-30 12:30:41 +0800 CST

Ubuntu 17.04 - 没有交换分区?

  • 13

为什么我的安装中没有交换分区?

$ lsblk
nvme0n1     259:0    0 238.5G  0 disk 
└─nvme0n1p1 259:1    0 238.5G  0 part /

我是否安装了 Ubuntu/Kubuntu 错误?

我认为它应该是这样的:

nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p5 259:3    0  15.9G  0 part [SWAP]
├─nvme0n1p1 259:1    0 222.6G  0 part /
└─nvme0n1p2 259:2    0     1K  0 part 

我刚刚选择了安装过程中的建议。但这似乎很奇怪。

system-installation
  • 1 个回答
  • 9937 Views
Martin Hope
Run
Asked: 2017-04-27 16:19:17 +0800 CST

如何判断 USB 驱动器被分配为哪个设备?

  • 10

如何判断 USB 驱动器分配为哪个设备?

插入 USB 驱动器之前:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p5 259:3    0  15.9G  0 part [SWAP]
├─nvme0n1p1 259:1    0 222.6G  0 part /
└─nvme0n1p2 259:2    0     1K  0 part 

后:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    1   1.9G  0 disk 
├─sda2        8:2    1   2.4M  0 part 
└─sda1        8:1    1   1.2G  0 part 
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p5 259:3    0  15.9G  0 part [SWAP]
├─nvme0n1p1 259:1    0 222.6G  0 part /
└─nvme0n1p2 259:2    0     1K  0 part 

是/dev/sda吗??

command-line
  • 4 个回答
  • 17732 Views
Martin Hope
Run
Asked: 2017-04-27 12:12:20 +0800 CST

clamav - 错误:/var/log/clamav/freshclam.log 被另一个进程锁定?

  • 91

我已经安装clamav并且我想更新它用来识别病毒的文件:

$ sudo freshclam

ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).

我应该怎么处理这个错误?

编辑:

$ sudo lsof /var/log/clamav/freshclam.log

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
freshclam 866 clamav    3wW  REG  259,1   100134 10486045 /var/log/clamav/freshclam.log
malware
  • 4 个回答
  • 133646 Views
Martin Hope
Run
Asked: 2017-02-13 02:12:39 +0800 CST

ubuntu 16.10 konsole 连接到 gb.archive.ubuntu.com 的速度非常慢 [重复]

  • 0
这个问题在这里已经有了答案:
IPv6 sudo apt-get update/upgrade 问题 1 个回答
5年前关闭。

为什么apt-get install下面这条线总是很慢?

0% [Connecting to gb.archive.ubuntu.com (2001:67c:1560:8001::14)]

有时需要长达 5 到 10 分钟。它大部分时间都卡在那里。

例如:

$ sudo apt-get install php-pgsql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gyp libjs-inherits libjs-node-uuid libuv1 libuv1-dev linux-headers-4.8.0-22 linux-headers-4.8.0-22-generic linux-image-4.8.0-22-generic linux-image-extra-4.8.0-22-generic
  node-abbrev node-ansi node-ansi-color-table node-archy node-async node-block-stream node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent node-form-data
  node-fstream node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs node-gyp node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache
  node-mime node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read
  node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore node-which
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  php7.0-pgsql
The following NEW packages will be installed
  php-pgsql php7.0-pgsql
0 to upgrade, 2 to newly install, 0 to remove and 1 not to upgrade.
Need to get 57.7 kB of archives.
After this operation, 223 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
0% [Connecting to gb.archive.ubuntu.com (2001:67c:1560:8001::14)]
Get:1 http://gb.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 php7.0-pgsql amd64 7.0.13-0ubuntu0.16.10.1 [55.8 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu yakkety/main amd64 php-pgsql all 1:7.0+44 [1,920 B]                                                                                     
Fetched 57.7 kB in 8min 4s (118 B/s)                                                                                                                                              
Selecting previously unselected package php7.0-pgsql.                                                                                                                             
(Reading database ... 258311 files and directories currently installed.)                                                                                                          
Preparing to unpack .../0-php7.0-pgsql_7.0.13-0ubuntu0.16.10.1_amd64.deb ...                                                                                                      
Unpacking php7.0-pgsql (7.0.13-0ubuntu0.16.10.1) ...
Selecting previously unselected package php-pgsql.
Preparing to unpack .../1-php-pgsql_1%3a7.0+44_all.deb ...
Unpacking php-pgsql (1:7.0+44) ...
Processing triggers for libapache2-mod-php7.0 (7.0.13-0ubuntu0.16.10.1) ...
Setting up php7.0-pgsql (7.0.13-0ubuntu0.16.10.1) ...

Creating config file /etc/php/7.0/mods-available/pgsql.ini with new version

Creating config file /etc/php/7.0/mods-available/pdo_pgsql.ini with new version
Setting up php-pgsql (1:7.0+44) ...
Processing triggers for libapache2-mod-php7.0 (7.0.13-0ubuntu0.16.10.1) ...

我在 ubuntu/kubuntu 16.10 上。

编辑:

$ ping -c4 gb.archive.ubuntu.com
PING gb.archive.ubuntu.com(steelix.canonical.com (2001:67c:1560:8001::11)) 56 data bytes

--- gb.archive.ubuntu.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3056ms

对比

$ ping6 -c4 gb.archive.ubuntu.com
PING gb.archive.ubuntu.com(steelix.canonical.com (2001:67c:1560:8001::11)) 56 data bytes

--- gb.archive.ubuntu.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3073ms

编辑2:

$ which ping
/bin/ping

$ ping -V
ping utility, iputils-s20150815
apt
  • 1 个回答
  • 1999 Views
Martin Hope
Run
Asked: 2016-12-25 12:17:35 +0800 CST

首次安装 Ubuntu 时可以使用无线键盘和鼠标吗?

  • 0

我将在一周内推出英特尔 NUC Skull Canyon 以及蓝牙键盘和鼠标等其他产品。

如何使用蓝牙键盘和鼠标安装 Ubuntu/Xubuntu?

这是bt键盘。

我只有在笔记本电脑上安装 Ubuntu 的经验,但以前从未在这种情况下安装过。以前有人用蓝牙键盘和鼠标安装过 Ubuntu/Xubuntu 吗?请提供一些建议和技巧。

或者最好使用有线键盘和鼠标?

16.04
  • 1 个回答
  • 7061 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