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

sps's questions

Martin Hope
sps
Asked: 2015-10-18 08:14:47 +0800 CST

如何使用我的旧内核?

  • 0

最近,我使用以下步骤编译并安装了内核版本 4.2.3。

$ wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.2.3.tar.gz 
$ tar xzvf linux-4.2.3.tar.gz
$ cd linux-4.2.3
$ make menuconfig

Then after saving the default configuration shown in menuconfig,

$ make
$ make modules_install
$ make install

完成上述步骤后,我可以看到以下变化:

vmlinuz-4.2.3(连同其他几个文件)被添加到/boot/目录中。

grub已更新 。

现在,我重新启动了我的计算机,令人惊讶的是,它没有出现任何问题。下面是现在的系统信息。

$ uname -a
Linux myMachine 4.2.3 #1 SMP Fri Oct 16 20:45:01 EDT 2015 x86_64 x86_64    x86_64 GNU/Linux 
$ uname -r
4.2.3
$ cat /proc/version 
Linux version 4.2.3 (sps@myMachine) (gcc version 4.8.4 (Ubuntu  4.8.4-2ubuntu1~14.04) ) #1 SMP Fri Oct 16 20:45:01 EDT 2015
$

所以看起来新内核 (4.2.3) 正在我的系统中运行(如果我需要检查任何其他命令(除了uname或cat /proc/version)以确定正在运行的内核,请告诉我)。

现在这是我的问题:- 我不知道如果我继续使用这个内核以后会遇到什么问题。

所以我想恢复并再次开始使用以前的内核。我该怎么做 ?

vmlinuz-3.19*我仍然可以3.19*在. 但我不知道如何再次使用旧内核启动?/boot/boot/grub/grub.cfg

如果我可以在启动时选择内核,那就更好了。

boot
  • 1 个回答
  • 2694 Views
Martin Hope
sps
Asked: 2015-10-16 23:24:45 +0800 CST

哪里/哪个是实际的内核源代码?

  • 8

我正在按照这个学习编译内核。我用了

apt-get source linux-image-$(uname -r)

下载我正在使用的 Linux 内核的源代码。

运行上述命令后,下载了以下文件(和目录)。

user $ ls -l
total 130972
drwxrwxr-x 27 sps sps      4096 Oct 16 03:10 linux-lts-vivid-3.19.0
-rw-rw-r--  1 sps sps  10980684 Oct  5 10:54 linux-lts-vivid_3.19.0-30.34~14.04.1.diff.gz
-rw-rw-r--  1 sps sps      7396 Oct  5 10:54 linux-lts-vivid_3.19.0-30.34~14.04.1.dsc
-rw-rw-r--  1 sps sps 123115155 May  6 21:35 linux-lts-vivid_3.19.0.orig.tar.gz
user $ 

在同一页中提到:

构建内核非常容易。将您的工作目录更改为内核源代码树的根目录,然后键入以下命令:

但我不确定哪个是“内核源代码树的根”。

它是当前目录(我运行apt-get source ...的位置以及上面列出的文件所在的位置)吗?

或者,它是目录:

drwxrwxr-x 27 sps sps      4096 Oct 16 03:10 linux-lts-vivid-3.19.0

或者,我应该提取 tarball

-rw-rw-r--  1 sps sps 123115155 May  6 21:35 linux-lts-vivid_3.19.0.orig.tar.gz

输出uname -r:

user $ uname -r
3.19.0-30-generic
user $ 
apt
  • 3 个回答
  • 3563 Views
Martin Hope
sps
Asked: 2015-06-06 16:10:17 +0800 CST

运行 aclocal 时 configure.ac 文件出错

  • 2

我正在关注https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install以了解如何使用autoconf和automake创建configure脚本以及Makefile.

以下是configure.ac文件内容:

AC_INIT ([helloworld], [0.1], [[email protected]])
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

但是,当我运行aclocal命令时,出现以下错误。

user $ aclocal
configure.ac:2: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.14/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:2: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
user $ 

我做了谷歌搜索,看看线路AC_INIT ([helloworld], [0.1], [[email protected]])是否不正确。但看起来这是正确的使用方法AC_INIT。

我该如何解决 ?

另外,下面是Makefile.am文件的内容(如果这与错误有关):

AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = helloworld
helloworld_SOURCES = hello.c
autoconf
  • 1 个回答
  • 7918 Views
Martin Hope
sps
Asked: 2015-06-01 21:17:45 +0800 CST

如何删除 compiz 所做的任何更改?

  • 3

我有带有统一桌面的 ubuntu 14.04。然后我下载并使用了 compiz 但搞砸了,现在统一桌面无法使用。我没有看到顶部的菜单或左侧的面板。按 后 CLI 也不可用Ctrl+Alt+t。

但是我仍然可以通过按 来访问 CLI Ctrl+Alt+F1。现在,如何撤消 compiz 应用的任何更改,以便桌面再次可用。

unity
  • 2 个回答
  • 775 Views
Martin Hope
sps
Asked: 2015-04-05 17:48:04 +0800 CST

如何在 vim 编辑器中突出显示搜索到的文本?

  • 2

我有 vim 编辑器 7.3 版

但是,在这种情况下,当我通过键入光标来搜索测试时,:/SEARCHTEXT光标会转到包含所搜索文本的行,但文本本身不会突出显示。

我试着打字:hlsearch,但我收到一条错误消息E492: Not an editor command: hlsearch

是不是因为我安装的vim包不支持hlsearch. 如果是,那么谁能告诉我应该安装哪个 vim 包以便突出显示搜索到的文本?

谢谢。

command-line
  • 1 个回答
  • 1078 Views
Martin Hope
sps
Asked: 2015-04-05 14:35:49 +0800 CST

bash 中 " " 和 ' ' 的区别

  • 6

我想弄清楚“”和''之间的区别是什么。

当我将它们与它们一起使用时,echo它们都会给出相同的结果,

sps@sps-Inspiron-N5110:~$ echo Hello    world
Hello world
sps@sps-Inspiron-N5110:~$ echo "Hello   world"
Hello   world
sps@sps-Inspiron-N5110:~$ echo 'Hello   world'
Hello   world
sps@sps-Inspiron-N5110:~$ 

有没有我们需要使用其中一个的特定情况?

谢谢。

command-line
  • 2 个回答
  • 14413 Views
Martin Hope
sps
Asked: 2015-04-04 20:09:47 +0800 CST

如何使用 find 命令重命名文件

  • 3

我正在尝试使用find命令重命名文件。

我正在尝试将 file-a 重命名为 file-10。

为此,我首先尝试了以下命令:

sps@sps-Inspiron-N5110:~$ find ~ -type f -name test-a -exec mv test-10 '{}' ';'
mv: cannot stat `test-10': No such file or directory
sps@sps-Inspiron-N5110:~$

然后我在下面尝试:

sps@sps-Inspiron-N5110:~$ find ~ -type f -name test-a -exec mv test-a test-10 '{}' ';'
mv: target `/home/sps/test-a' is not a directory
sps@sps-Inspiron-N5110:~$

现在我想不出如何用find. 我正在尝试使用 来执行此操作find,因为我将有许多具有相同文件名的目录,并且我想在一个命令中将所有更改test-a为。test-10任何人请建议。

谢谢。

command-line
  • 1 个回答
  • 13695 Views
Martin Hope
sps
Asked: 2015-04-03 21:31:06 +0800 CST

如何从命令行卸载 emacs?

  • 3

我有 ubuntu 12.04

我使用以下命令安装了 emacs。

$ apt-get update
$ apt-get install emacs

然后,正如预期的那样,我可以在 dash 中搜索时找到 emacs。

接下来我想卸载 emacs,所以我做了:

$ apt-get remove emacs

但我仍然可以在 dash 中搜索 emacs。我也可以打开 emacs 并使用它。

但是,当我检查以下命令时。

sps@sps-Inspiron-N5110:~$ dpkg --status emacs
Package `emacs' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
sps@sps-Inspiron-N5110:~$ 

它说没有安装emacs。但是我怎么才能使用emacs呢?

要正确询问“如何卸载它?”

我的意思是如何删除所有内容。我不想要任何这些 - 源代码(如果有的话),或二进制可执行文件,或任何与 emacs 相关的东西 - 在我的系统中,这是在我这样做时添加的apt-get install emacs。

谢谢。

command-line
  • 1 个回答
  • 11127 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