在 Ubuntu 16.04 LTS 上安装 wmic

tre*_*ite 3 server 16.04

有没有人设法将 wmic 安装到 Ubuntu 16.04 LTS 服务器上?这些说明适用于 14.04(包括 14.04 上的人),但我在 16.04 上遇到一个又一个错误,想知道是否还有其他人成功

cd /tmp
mkdir wmic
cd wmic

apt install autoconf gcc libdatetime-perl make build-essential g++ python-dev
wget http://www.opsview.com/sites/default/files/wmi-1.3.16.tar_.bz2
bunzip2 wmi-1.3.16.tar_.bz2
tar -xvf wmi-1.3.16.tar_
cd wmi-1.3.16/

vim Samba/source/pidl/pidl
:583 (to jump to line 583)
remove the word defined before @$pidl
:wq 

export ZENHOME=/usr
make "CPP=gcc -E -ffreestanding"
cp Samba/source/bin/wmic /bin
Run Code Online (Sandbox Code Playgroud)

非常感谢

tre*_*ite 5

为了知识共享,这里是如何让 wmic 在 Ubuntu 16.04 LTS 上工作,问题是打开文件数的限制

ulimit -n 100000
cd /tmp
mkdir wmic
cd wmic

apt install autoconf gcc libdatetime-perl make build-essential g++ python-dev
wget http://www.opsview.com/sites/default/files/wmi-1.3.16.tar_.bz2
bunzip2 wmi-1.3.16.tar_.bz2
tar -xvf wmi-1.3.16.tar_
cd wmi-1.3.16/

vim Samba/source/pidl/pidl
:583 (to jump to line 583)
remove the word defined before @$pidl
:wq 

export ZENHOME=/usr
make "CPP=gcc -E -ffreestanding"
cp Samba/source/bin/wmic /bin
Run Code Online (Sandbox Code Playgroud)

现在应该可以工作了。