关于ubuntu-server:Ubuntu编译生成libevent库

下载libevent配置 2.1 ./configure --prefix=/usr/lib/libevent 报错如下 configure: error: openssl is a must but can not be found. You should add the directory containing `openssl.pc' to the `PKG_CONFIG_PATH' environment variable, or set `CFLAGS' and `LDFLAGS' directly for openssl, or use `--disable-openssl' to disable support for openssl encryption2.2 解决办法: 须要配置环境变量PKG_CONFIG_PATH为openssl.pc的门路,Ubuntu曾经装了openssl,然而找不到openssl.pc,起因是没有装置 libssl-dev。 输出命令: sudo apt install -y libssl-dev 后装置后能够找到openssl.pc的门路:/usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc 2.3 配置环境变量PKG_CONFIG_PATH后,2.1的命令能够执行胜利 编译 1) make 2) sudo make install查看后果 ll /usr/lib/libevent

January 7, 2023 · 1 min · jiezi

关于ubuntu-server:ubuntu2004-设置静态ip

ubuntu20.04禁用dhcp应用动态ip注意事项 假如要把ip地址设为 192.168.1.38 子网掩码24位即255.255.255.0首先确认网卡名称 应用ifconfig命令: `eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.39 netmask 255.255.255.0 broadcast 192.168.1.255`网卡名称 eno1 目前的ip地址是192.168.1.39,子网掩码24位 确认网关地址:应用 route -n 命令 `Destination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eno1`默认网关 192.168.1.1 最初编辑 sudo vim /etc/netplan/01-network-manager-all.yaml 填入: `network: version: 2 renderer: NetworkManager ethernets: eno1: # 网卡名称 dhcp4: no # 敞开dhcp dhcp6: no addresses: [192.168.1.38/24] # 动态ip gateway4: 192.168.1.1 # 网关 nameservers: addresses: [8.8.8.8, 114.114.114.114]`# dns 运行 sudo netplan apply 使配置失效在网络连接里,能够找到最新配置的连贯 ...

July 29, 2020 · 1 min · jiezi