1) 我需要从 Snort 网站下载并安装 Data AcQuisition 库 (DAQ)。代码本身是众所周知的,并且没有问题:
cd ~/snort_src
git clone https://github.com/snort3/libdaq.git
cd libdaq
./bootstrap
./configure
make
sudo make install
2) 安装后我应该更新上面的共享库:
sudo ldconfig
问题来了……
3) 无论我怎么努力,我都无法摆脱这个困境”ldconfig”命令下面是我的终端响应:
ubuntu@ubuntu-server:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ubuntu@ubuntu-server:~$ sudo ldconfig
sudo: unable to resolve host ubuntu-server: Name or service not known
ubuntu@ubuntu-server:~$ ldconfig
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
ubuntu@ubuntu-server:~$ su; ldconfig
Password:
root@ubuntu-server:/home/ubuntu# ldconfig
root@ubuntu-server:/home/ubuntu#
root@ubuntu-server:/home/ubuntu# exit
exit
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
ubuntu@ubuntu-server:~$
ubuntu@ubuntu-server:~$ sudo /sbin/ldconfig
sudo: unable to resolve host ubuntu-server: Name or service not known
4) 由于我对这一切都很陌生(而且我只想安装 SNORT+GRAFANA)所以我在这一点上遇到了困难...希望有人可以帮助我......?
我已经检查了一些解决方案(.bashrc,...)但没有任何帮助...并且在库正常之前我无法运行我的 SNORT 安装...
答案1
关于 ldconfig 问题,Mr.steeldriver 在下面的评论中提供了解决方案:
据我所知,这是正常的 - 如果你想“看到”某些东西,请以详细模式运行它,例如 sudo ldconfig -v – steeldriver 1
非常感谢 !
所需变更如下:
cat /etc/hostname #You get your hostname here
sudo nano /etc/hosts #You make changes here (save after CTRL X)
127.0.0.1 localhost #Original code
127.0.0.1 localhost localhost.localdomain ubuntu-server #Changed code with hostname