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

mahmood's questions

Martin Hope
mahmood
Asked: 2021-03-30 12:45:48 +0800 CST

从私有接口路由到公共接口

  • 0

我们的服务器有两个接口,一个用于通过互联网连接,另一个用于内部网络。

172.20.54.10 -> Interface with static ip for connecting through internet
10.1.1.1     -> Internal network

看到以下配置

$ ip route
default via 172.20.54.1 dev enp12s0f1 proto static metric 20100
10.1.1.0/24 dev enp12s0f0 proto kernel scope link src 10.1.1.1 metric 101
169.254.0.0/16 dev enp12s0f1 scope link metric 1000
172.20.54.0/24 dev enp12s0f1 proto kernel scope link src 172.20.54.10 metric 100
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp12s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:e0:81:e4:84:84 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.1/24 brd 10.1.1.255 scope global noprefixroute enp12s0f0
       valid_lft forever preferred_lft forever
    inet6 fe80::a424:72eb:4702:8f86/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: enp12s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:e0:81:e4:84:85 brd ff:ff:ff:ff:ff:ff
    inet 172.20.54.10/24 brd 172.20.54.255 scope global noprefixroute enp12s0f1
       valid_lft forever preferred_lft forever
    inet6 fe80::b0cf:3f53:bb4e:d836/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

内部网络包含一些具有 10.1.1.X IP 地址的虚拟机,它们似乎没有通过服务器的公共接口连接到互联网。服务器是 Ubutnu 20.04。

我应该为ip转发配置其他东西吗?

更新:

在ip_forward内核中启用

$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

我还不得不说,虚拟机(例如 10.1.1.3)能够 ping 专用接口 10.1.1.1,但无法 ping 8.8.8.8。

在此处输入图像描述

routing ubuntu-20.04
  • 1 个回答
  • 87 Views
Martin Hope
mahmood
Asked: 2018-11-15 01:59:40 +0800 CST

Centos 中的 SSL 设置(.pem 和 .crt 文件)

  • 0

我想在 Apache 上设置 SSL 配置。我在网上看到的只是应该有一些 .key 和 .crt 文件。但是,我有这些文件

# ls
fullchain.crt  private.pem
certificate.crt             order          public.pem

我根据这里的解释尝试了以下配置,但是,通过重新启动httpd ,我收到一个错误,提示找不到私钥。

SSLEngine on
SSLCertificateFile /home/snadmin/certificate.crt
SSLCertificateKeyFile /home/snadmin/public.pem
SSLCertificateChainFile /home/snadmin/fullchain.crt
<Directory "/var/www/html/">

我该如何改变呢?

ssl
  • 1 个回答
  • 923 Views
Martin Hope
mahmood
Asked: 2018-08-30 06:42:57 +0800 CST

“顶部”条目的列宽

  • 2

top命令输出中的用户+名列显示长度超过列宽的名称。我怎样才能增加它?

我没有看到任何选择。

top
  • 1 个回答
  • 1214 Views
Martin Hope
mahmood
Asked: 2017-05-16 21:17:07 +0800 CST

网络服务器无法访问

  • 2

在 centos-7 上,我已经安装了 Web 服务器,但我无法通过 Web 浏览器看到测试页面。

# yum list httpd*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.iphh.net
 * epel: mirror.imt-systems.com
 * extras: mirror.wiuwiu.de
 * updates: mirror.daniel-jost.net
Installed Packages
httpd.x86_64                                                2.4.6-45.el7.centos.4                                        @updates
httpd-manual.noarch                                       2.4.6-45.el7.centos.4                                        @updates
httpd-tools.x86_64                                        2.4.6-45.el7.centos.4                                        @updates
Available Packages
httpd-devel.x86_64                                        2.4.6-45.el7.centos.4                                        updates 
httpd-itk.x86_64                                          2.4.7.04-1.el7                                               epel    
# ls /etc/init.d/
functions  iprdump  iprinit  iprupdate  netconsole  network  README
# ps aux | grep httpd
root     28879  0.0  0.8 240340  8340 ?        Ss   01:03   0:00  /usr/sbin/httpd -DFOREGROUND
apache   28880  0.0  0.3 242352  3432 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28881  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28882  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28883  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28884  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28885  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
root     29076  0.0  0.0 112640   972 pts/0    S+   01:09   0:00 grep --color=auto httpd
# ps aux | grep apache
apache   28880  0.0  0.3 242352  3432 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28881  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28882  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28883  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28884  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
apache   28885  0.0  0.3 242424  3700 ?        S    01:03   0:00 /usr/sbin/httpd -DFOREGROUND
root     29078  0.0  0.0 112640   980 pts/0    S+   01:09   0:00 grep --color=auto apache

看日志,我明白了

 # cat /var/log/httpd/access_log 
 # cat /var/log/httpd/error_log 
 [Tue May 16 01:03:35.055960 2017] [core:notice] [pid 28879] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
 [Tue May 16 01:03:35.057776 2017] [suexec:notice] [pid 28879] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
 AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
 [Tue May 16 01:03:35.073921 2017] [auth_digest:notice] [pid 28879] AH01757: generating secret for digest authentication ...
 [Tue May 16 01:03:35.074540 2017] [lbmethod_heartbeat:notice] [pid 28879] AH02282: No slotmem from mod_heartmonitor
 [Tue May 16 01:03:35.101221 2017] [mpm_prefork:notice] [pid 28879] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 configured -- resuming normal operations
 [Tue May 16 01:03:35.101259 2017] [core:notice] [pid 28879] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

有更多调试的想法吗?

web-server
  • 1 个回答
  • 1701 Views
Martin Hope
mahmood
Asked: 2016-06-17 06:28:40 +0800 CST

启动 httpd 时没有可用的侦听套接字

  • 0

我们的服务器配置了内部 IP。然后在防火墙中,管理员映射了一个有效的 IP 地址 (2.XYZ)。所以,ipconfig命令显示

eth1      Link encap:Ethernet  HWaddr 00:E0:61:36:D5:34
          inet addr:172.20.54.10  Bcast:172.20.54.255  Mask:255.255.255.0
          inet6 addr: fe80::270:81ef:fec6:d534/64 Scope:Link

但是,我们使用ssh 2.X.Y.Z. 现在,我想设置 apache web 服务器,以便在 web 浏览器中输入 2.XYZ。所以,我打开/etc/httpd/conf/httpd.conf并修改

Listen 2.X.Y.Z:80
Listen 80

我用数字替换了 XYZ。问题是,当我重新启动 httpd 时,出现此错误

Starting httpd: (99)Cannot assign requested address: make_sock: could not bind to address 2.X.Y.Z:80
no listening sockets available, shutting down
Unable to open logs
                                                       [FAILED]

更新 1:

如果我替换Listen 2.X.Y.Z为Listen 172.20.54.10,那么我会收到此错误

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                       [FAILED]

如果我评论该行,服务将启动。但是,在浏览器中,有效的 IP 2.XYZ 不起作用。相反,内部 IP172.20.54.10有效。换句话说,apache 测试页面仅从本地网络显示。

httpd centos6
  • 1 个回答
  • 3266 Views
Martin Hope
mahmood
Asked: 2016-05-02 01:42:42 +0800 CST

使用 Apache Web 服务器下载文件

  • 0

在 Centos-6 机器上,我设置了 Apache Web 服务器,默认文件夹是/var/www/html. 在存在空白的情况下index.html,通过在浏览器中输入机器的 IP 地址,我看到了空白的白色屏幕。这意味着,Web 服务器正在工作。

当我放一个文件供下载时,问题是当我输入机器的IP地址时,我仍然看到空白页。我希望看到像这样的树状结构。

我该如何解决?

apache-2.2 centos6
  • 1 个回答
  • 4418 Views
Martin Hope
mahmood
Asked: 2016-03-14 23:41:29 +0800 CST

dnsmasq 重启失败

  • -2

每当我想重新启动dnsmasq服务时,我都会收到此错误

root@ipm:/tftpboot# /etc/init.d/dnsmasq restart
[....] Restarting dnsmasq (via systemctl): dnsmasq.serviceJob for
dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
 failed!

如错误消息中所述,这些命令中没有有用的信息。

# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d             └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.con 
   Active: failed (Result: exit-code) since  2016-03-4 11:04:42 IRST; 3min 53s ago
  Process: 18806 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=1/FAILURE)

 14 11:04:42  systemd[1]: Starting dnsmasq - A lightweight DHCP .....
 14 11:04:42  dnsmasq[18806]: dnsmasq: bad dhcp-range at line 4 o...f
 14 11:04:42  systemd[1]: dnsmasq.service: Control process exite...=1
 14 11:04:42  systemd[1]: Failed to start dnsmasq - A lightweigh...r.
 14 11:04:42  systemd[1]: dnsmasq.service: Unit entered failed state.
 14 11:04:42  systemd[1]: dnsmasq.service: Failed with result 'e...'.
Hint: Some lines were ellipsized, use -l to show in full.

的内容dnsmasq.conf是

 # cat /etc/dnsmasq.conf
 interface=enp3s0
 domain=hpclab
 expand-hosts
 dhcp-range=192.168.1.1,192.168.1.20,static
 dhcp-option=42,0.0.0.0
 dhcp-boot=pxelinux.0
 enable-tftp
 tftp-root=/tftpboot
 dhcp-host=00:e0:81:c5:19:64,ws01,192.168.1.1

所以,第 4 行是dhcp-range=192.168.1.1,192.168.1.20,static. 我在 ubuntu-12.04 中使用了相同的内容。

更新:

无论如何,正确的语法是dhcp-range=192.168.1.0,static. 我不知道 12.04 是如何工作的!

dnsmasq
  • 1 个回答
  • 16433 Views
Martin Hope
mahmood
Asked: 2015-04-16 03:39:19 +0800 CST

在 linux 中打开一个 RTSP 端口

  • 0

我想检查客户端是否可以通过 rtsp://192.168.1.5:554 访问服务器。如您所见,rtsp 协议和端口#554 必须打开并在服务器上工作。

我可以添加吗

iptables -A INPUT -m state --state NEW -p tcp --dport 554 -j ACCEPT

但协议被指定为 tcp。将其更改为-p rtsp也不起作用。

对此有任何想法吗?

networking
  • 1 个回答
  • 2845 Views
Martin Hope
mahmood
Asked: 2014-08-04 10:16:18 +0800 CST

重新启动后出现“过时的 NFS 文件句柄”

  • 18

在服务器节点上,可以访问导出的文件夹。但是,在重新启动(服务器和客户端)后,不再可以从客户端访问该文件夹。

在服务器上

# ls /data
Folder1
Forlder2

并且 /etc/exports 文件包含

/data 192.168.1.0/24(rw,no_subtree_check,async,no_root_squash)

在客户端

# ls /data
ls: cannot access /data: Stale NFS file handle

我不得不说客户端的共享文件夹没有问题,但是在重新启动(服务器和客户端)后,我看到了这条消息。

有什么办法可以解决吗?

nfs
  • 4 个回答
  • 102640 Views
Martin Hope
mahmood
Asked: 2014-08-03 04:26:44 +0800 CST

不正确的子网/掩码组合

  • 0

对于网络接口,我为 DHCP 定义了一个地址范围。

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 08:00:27:5a:3e:be brd ff:ff:ff:ff:ff:ff
inet 10.0.2.1/24 brd 10.0.2.255 scope global eth1

并且 dhcpd.conf 文件包含

subnet 10.0.2.1 netmask 255.255.255.240 {
  range 10.0.2.2 10.0.2.10;
  allow booting;
  allow bootp;
  class "pxeclients" {
    match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
    next-server 10.0.2.3;
    filename "pxelinux.0";
 }
}

但是,当我启动 dhcpd 时,出现此错误

/etc/dhcp/dhcpd.conf line 1: subnet 10.0.2.1 netmask 255.255.255.240: bad subnet number/mask combination.
subnet 10.0.2.1 netmask 255.255.255.240 
                                    ^
Configuration file errors encountered -- exiting

问题是什么?

linux
  • 1 个回答
  • 1251 Views
Martin Hope
mahmood
Asked: 2014-08-02 05:43:58 +0800 CST

dnsmasq:未能创建监听套接字:地址已在使用中

  • 10

操作系统是 Scientific Linux 6.3(类似于 redhat、centos 和 fedora),我安装了 dnsmasq,配置如下

interface=eth1
domain=hpclab
expand-hosts
dhcp-range=10.0.2.51,10.0.2.100,static
dhcp-option=42,0.0.0.0
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-host=08:00:27:69:73:7A,ws04,10.0.2.51

当前节点(运行 dnsmasq)有这个 ip

eth1  Link encap:Ethernet  HWaddr 08:00:27:A9:20:C0  
      inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fea9:20c0/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

但是,尝试启动 dnsmasq 服务时出现错误

[root@localhost mahmood]# /etc/init.d/dnsmasq status
dnsmasq is stopped
[root@localhost mahmood]# /etc/init.d/dnsmasq start
Starting dnsmasq: 
dnsmasq: failed to create listening socket: Address already in use
                                                       [FAILED]

netstat 命令显示以下信息

[root@localhost mahmood]# netstat -anlp | grep -w LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1252/rpcbind        
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1445/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1685/master         
tcp        0      0 0.0.0.0:46556               0.0.0.0:*                   LISTEN      1348/rpc.statd      
tcp        0      0 :::111                      :::*                        LISTEN      1252/rpcbind        
tcp        0      0 :::80                       :::*                        LISTEN      4884/httpd          
tcp        0      0 ::1:631                     :::*                        LISTEN      1445/cupsd          
tcp        0      0 :::51096                    :::*                        LISTEN      1348/rpc.statd      

和

[root@localhost mahmood]# netstat -aunp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
udp        0      0 0.0.0.0:69                  0.0.0.0:*                               5110/xinetd         
udp        0      0 0.0.0.0:34136               0.0.0.0:*                               1323/avahi-daemon   
udp        0      0 0.0.0.0:38756               0.0.0.0:*                               1348/rpc.statd      
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               1323/avahi-daemon   
udp        0      0 0.0.0.0:1003                0.0.0.0:*                               1252/rpcbind        
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1252/rpcbind        
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1445/cupsd          
udp        0      0 0.0.0.0:676                 0.0.0.0:*                               1348/rpc.statd      
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               5189/dhclient       
udp        0      0 :::1003                     :::*                                    1252/rpcbind        
udp        0      0 :::111                      :::*                                    1252/rpcbind        
udp        0      0 :::43248                    :::*                                    1348/rpc.statd      

什么会导致此类错误,我该如何解决?

networking
  • 1 个回答
  • 41045 Views
Martin Hope
mahmood
Asked: 2014-04-18 09:38:51 +0800 CST

使用有效/无效 IP 配置 httpd

  • 0

我们的服务器必须有网络接口。第一个有一个我们运行 httpd 的有效 IP,第二个有一个内部 IP (192.168.XX)。下面列出的更多信息

# cat /etc/hosts
127.0.0.1      localhost.localdomain localhost
192.168.1.5    srv1



# cat /etc/httpd/conf/httpd.conf
...
<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot /var/www/html/munin
   ServerName 124.205.99.114
   ErrorLog logs/dummy-host.example.com-error_log
   CustomLog logs/dummy-host.example.com-access_log common
      <Directory /var/www/html/munin>
        Satisfy any
      </Directory>
</VirtualHost>

当我重新启动 httpd 时,我看到一个警告是

# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.1.5 for ServerName
                                                           [  OK  ]

你可能会说这只是一个警告,但是当我在网络浏览器中输入 IP 地址时,没有显示 index.html 文件,我得到了The connection has timed out

更新:

似乎警告与“超时”问题无关。的输出iptables -nvL如下

# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
1334K  146M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
   17   736 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0
 1259  486K ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
  964 56148 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
    5   300 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:2049
60244 7018K REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 1183K packets, 1247M bytes)
 pkts bytes target     prot opt in     out     source               destination

更新 2:

我用这个命令允许端口 80

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

可以用这个输出来验证

# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
....
61165 7150K REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80

我重新启动了服务network,httpd但仍然无法在浏览器中打开 index.html。

web-server
  • 2 个回答
  • 52 Views
Martin Hope
mahmood
Asked: 2013-03-07 21:52:27 +0800 CST

将RSA密钥注入腻子

  • 2

我想用一把rsa钥匙 ssh 到一台远程机器。在 linux 中,这很简单:

ssh -i file.rsa [email protected]

但是我怎么能在 Windows 中使用putty呢?

windows
  • 2 个回答
  • 110 Views
Martin Hope
mahmood
Asked: 2013-02-24 11:10:11 +0800 CST

“/usr/bin/ld: 找不到 -lz” 但 libz 存在

  • 3

在基于 Redhat 的 linux (amd64) 上制作我的程序时,出现此错误:

/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status

搜索互联网显示我没有安装 zlib 32 位版本。快速搜索显示我有那个包裹

[root@localhost trunk]# find / -name libz*
/lib64/libz.so.1
/lib64/libz.so.1.2.3
/lib/libz.so.1
/lib/libz.so.1.2.3
/usr/lib64/libz.so
/usr/lib64/purple-2/libzephyr.so
/usr/lib64/libzip.so.1.0.0
/usr/lib64/libzip.so.1

如您所见,两者都/lib包含/lib64libz 文件。接下来我尝试找到 ldd 搜索路径,它显示同时包含 32 位和 64 位文件夹

[root@localhost trunk]# ldconfig -v | grep -v ^$'\t'
/usr/lib64/ctapi:
/usr/lib64/mysql:
/usr/lib64/tcl8.5/tclx8.4:
/usr/lib64/xulrunner-2:
/lib:
/lib64:
/usr/lib:
/usr/lib64:
/lib/i686: (hwcap: 0x0008000000000000)
/lib64/tls: (hwcap: 0x8000000000000000)  
/usr/lib64/tls: (hwcap: 0x8000000000000000)
/usr/lib64/sse2: (hwcap: 0x0000000004000000)
/lib/i686/nosegneg: (hwcap: 0x0028000000000000)

所以我想知道为什么我仍然会收到该错误!!!!

更新

我安装了zlib-devel(i686 和 x86_64),这里是确认信息

 [root@localhost trunk]# yum list zlib-devel
 Installed Packages
 zlib-devel.i686     1.2.3-27.el6             @sl
 zlib-devel.x86_64   1.2.3-27.el6             @sl

但是我仍然遇到同样的错误。

更新 2

修复不正确的符号链接后,我现在有

[root@localhost trunk]# ls -l /lib/libz.so*
lrwxrwxrwx. 1 root root    18 Feb 23 22:58 /lib/libz.so -> /usr/lib64/libz.so
lrwxrwxrwx. 1 root root    13 Feb 18 12:06 /lib/libz.so.1 -> libz.so.1.2.3
-rwxr-xr-x. 1 root root 75332 Dec 10  2011 /lib/libz.so.1.2.3

但错误依然存在

解决方案

解决方案

我发现我必须安装静态库。不知道为什么Makefile要搜索静态库!包名请参考我的评论。

感谢fuero的帮助

linux
  • 2 个回答
  • 24844 Views
Martin Hope
mahmood
Asked: 2013-02-19 09:25:42 +0800 CST

查找ldd搜索路径

  • 12

我怎样才能找到的搜索路径ldd?假设ldd回报

[mahmood@dhcppc2 bin]$ ldd /home/mahmood/amd64-linux/lib/scsi-bus.so
        linux-vdso.so.1 =>  (0x00007fffc27c7000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffb13a25000)
        libstdc++.so.5 => not found
        libm.so.6 => /lib64/libm.so.6 (0x00007ffb137a0000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ffb13589000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffb131f6000)
        /lib64/ld-linux-x86-64.so.2 (0x00000037d6000000)

我想知道默认位置是ldd什么?我的意思是/lib64或/usr/lib或/usr/lib64......?

linux
  • 2 个回答
  • 11408 Views
Martin Hope
mahmood
Asked: 2013-02-18 02:19:19 +0800 CST

在 redhat 中更新软件列表

  • 0

sudo apt-get updateredha/fedora/centost 中的等效命令是什么?我的意思是如何刷新和下载存储库中的软件列表?

linux
  • 3 个回答
  • 48 Views
Martin Hope
mahmood
Asked: 2013-02-17 04:15:18 +0800 CST

从 PID 中查找命令

  • 15

是否有可能找到正在运行的进程的命令行pid?的输出/proc/${PID}/cmdline似乎删除了空格字符,很难读取输出。

linux
  • 4 个回答
  • 23774 Views
Martin Hope
mahmood
Asked: 2013-02-14 00:34:41 +0800 CST

从 .so 文件中删除共享库链接

  • 2

ldd是显示共享库文件位置的有用命令。假设,以下命令

$ ldd foo.so
      libpython2.4.so => /path/to/file

我怎样才能删除那个链接,这样我就会有

$ ldd foo.so
      libpython2.4.so => not found

?

linux
  • 1 个回答
  • 4636 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