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

kwoxer's questions

Martin Hope
kwoxer
Asked: 2016-06-05 09:57:49 +0800 CST

错误:无法打开目录/lib/modules/4.2.0-25-generic:没有这样的文件或目录

  • 3

我将 Ubuntu 15.10 升级到16.04,一定是在某个地方发生了我的麻烦。

当我想做的时候,我第一次意识到我的麻烦sudo iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT。我得到了:

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.0-25-generic/modules.dep.bin'
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.2.0-25-generic
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

好的,所以有一个问题/lib/modules/4.2.0-25-generic......

然后我尝试用sudo depmod. 但我得到了:

depmod: ERROR: could not open directory /lib/modules/4.2.0-25-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

现在我想用 重建内核sudo apt-get install --reinstall linux-...,这里有一些版本,例如:

linux-image-3.13.0-24-generic             
linux-image-3.4.0-4-goldfish              
linux-image-4.4.0-21-generic              
linux-image-4.4.0-21-lowlatency           
linux-image-4.4.0-22-generic              
linux-image-4.4.0-22-lowlatency  

但没有linux-image-4.2.0-25-generic。奇怪的事情。因此,通过升级 Linux,不知何故设置了旧版本和错误版本的内核。

现在我想看看这个版本保存在哪里。我在uname -r命令中找到了它。所以apt-get install linux-image-'uname -r'-dbgsym,就像:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-4.2.0-25-generic-dbgsym
E: Couldn't find any package by glob 'linux-image-4.2.0-25-generic-dbgsym'
E: Couldn't find any package by regex 'linux-image-4.2.0-25-generic-dbgsym'

但我不知道如何uname -r手动更改。而且我也不知道为什么我得到了这个错误的版本。最重要的是,如果更改uname.

顺便说一句,我使用 Digitalocean 并通过do-release-upgrade.

编辑#1

我只是想看看我当前的内核。它实际上是 4.4.0-22:

sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-22-generic
Found initrd image: /boot/initrd.img-4.4.0-22-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

但 uname 仍然说:

uname -r
4.2.0-25-generic

有人可以解释一下可能发生了什么以及如何解决吗?

linux ubuntu iptables
  • 2 个回答
  • 13714 Views
Martin Hope
kwoxer
Asked: 2016-05-09 11:35:26 +0800 CST

pecl install pecl_http 失败 - 升级到 php7 和 http.so 会出现问题

  • 1

类似问题:pecl_http 加载失败

所以我想升级到PHP7.0,我相信一切都很好。但我认为我错过了一些页面包,因为我无法登录到 my ownCloud。所以我想安装pecl_http:

pecl install pecl_http
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/http.so' - /usr/lib/php/20151012/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
downloading pecl_http-3.0.1.tgz ...
Starting to download pecl_http-3.0.1.tgz (197,372 bytes)
.............done: 197,372 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
where to find zlib [/usr] :
where to find libcurl [/usr] :
where to find libevent [/usr] :
where to find libidn [/usr] :
building in /tmp/pear/temp/pear-build-root0suVKL/pecl_http-3.0.1
running: /tmp/pear/temp/pecl_http/configure --with-php-config=/usr/bin/php-config --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libidn-dir=/usr
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable extended HTTP support... yes, shared
checking for egrep... (cached) /bin/grep -E
checking for a sed that does not truncate output... (cached) /bin/sed
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for off_t... yes
checking for mbstate_t... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for gethostname... yes
checking for getdomainname... yes
checking for mbrtowc... yes
checking for mbtowc... yes
checking for iswalnum... yes
checking for inet_pton... yes
checking for idna.h... found in /usr
checking for libidn version... 0.26
checking for zlib.h... found in /usr
checking for zlib version >= 1.2.0.4... 1.2.8
checking for curl/curl.h... found in /usr
checking for curl-config... found: /usr/bin/curl-config
checking for curl version >= 7.18.2... 7.35.0
checking for HTTP2 support in libcurl... no
checking for SSL support in libcurl... yes
checking for OpenSSL support in libcurl... no
checking for GnuTLS support in libcurl... yes
checking gnutls.h usability... no
checking gnutls.h presence... no
checking for gnutls.h... no
checking for NSS support in libcurl... no
checking for SecureTransport support in libcurl... no
checking for GSKit support in libcurl... no
checking for ares support in libcurl... no
checking whether CURLOPT_TLSAUTH_TYPE expects CURL_TLSAUTH_SRP or literal "SRP"... "SRP"
checking for bundled SSL CA info... /etc/ssl/certs/ca-certificates.crt
checking for event2/event.h... not found
configure: WARNING: continuing without libevent support
checking for ext/raphf support... PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/http.so' - /usr/lib/php/20151012/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
no
configure: error: Please install pecl/raphf and activate extension=raphf.so in your php.ini
ERROR: `/tmp/pear/temp/pecl_http/configure --with-php-config=/usr/bin/php-config --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libidn-dir=/usr' failed

我不知道有什么/usr/lib/php/20151012/http.so好处。首先,我应该是这样的:

PHP 警告:PHP 启动:无法加载动态库 '.../http.so' - .../http.so:无法打开共享对象文件:第 0 行的未知中没有此类文件或目录

之后我只是删除了它,至少它说它不存在。好吧……那我现在能做什么。出了什么问题?如何重新创建该 http.so 文件?

顺便说一句:* 已经尝试安装旧版本,同样的错误

php nginx php7 pecl
  • 2 个回答
  • 5117 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve