Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The tangled process of installing dos2unix on 32-bit RHEL6

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

No wonder oldboy does not support beginners using RHEL.

During this time, the client of nagios was installed on two virtual machines through CentOS5.8 and RHEL6.0, respectively, and everything went well with CentOS. But RHEL keeps making trouble for me. A few days ago, there was a problem installing mysql in the RHEL environment yum, which delayed 2 days. I spent another hour last night plus this afternoon because I installed the dos2unix command on RHEL.

By downloading the package early this morning, the compilation and installation always reported an error. This afternoon in Baidu search yum to install this command, it is not much of a point. So I tried to specify "dos2unix*" directly through yum (execute the "yum-y install dos2unix*" command). Unexpectedly, the installation was successful and there was no problem with the subsequent tests.

I tossed around to 0:40 last night. I really didn't want to stay up too late. Although I am not reconciled to it, I still pack up and get ready for bed. At that time, I began to hesitate again: whether or not to insist on installing the nagios client on RHEL. Even if the dos2unix command is successfully installed the next day, you may encounter other problems later. However, think again: the process of discovering and solving problems is the process of self-improvement. After all, the work is basically implemented and there is no longer worrying about livelihood. It shouldn't be a big deal to spend more time solving such small problems.

Moreover, linux itself is a complicated collection of all kinds of small knowledge. If you can't deal with small problems, you will be even more blind when big problems are encountered.

Why doesn't RHEL6 have the command dos2unix? Is it the reason why I didn't choose a good package when I installed the system? God knows.

-- get down to business.

[root@nagios_client02 nagios] # dos2unix / usr/local/nagios/libexec/check_memory.pl-bash: dos2unix: command not: [root @ nagios_client02 nagios] # dos2unix / usr/local/nagios/libexec/check_iostat-bash: dos2unix: command not [root @ nagios_client02 nagios] # cd.

Execute the dos2unix command, prompting that the command was not found. Maybe dos2unix is not installed in the RHEL environment.

Search and install the dos2unix command in Baidu, according to the document: "what to do if the http://blog.csdn.net/bluewhale1/article/details/8074978--dos2unix command cannot be found?"

Download the hd2u-1.0.0.tgz package at http://linux.softpedia.com/progDownload/Dos2Unix-Download-5519.html.

Download page is full of English content, after groping, here is a simple description of the download steps: click the "DOWNLOAD" button on the left, the right "DOWNLOAD LOCATIONS:" can be displayed. Click the "Sources mirror 1 (tgz)" link to go to the next page, and after a period of time, the download dialog box will pop up automatically.

[root@nagios_client02 tools] # wget http://terminus.sk/~hany/_data/hd2u/hd2u-1.0.0.tgz--2014-09-07 00VOR 03UR 11MUR-http://terminus.sk/~hany/_data/hd2u/hd2u-1.0.0.tgzResolving terminus.sk... 92.240.244.10Connecting to terminus.sk | 92.240.244.10 |: 80. Connected.HTTP request sent, awaiting response... OKLength: 54461 (53K) [application/x-gzip] Saving to: `hd2u-1.0.0.tgz'100% [= >] 54461 248K/s in 0.2s2014-09-07 00:03:28 (248KB/s)-`hd2u-1.0.0.tgz' saved [54461 root root 54461] [root@nagios_client02 tools] # ll hd2u-1.0.0.tgz-rw-r--r-- 1 root root 54461 Mar 15 2005 hd2u-1.0.0 .tgz [root @ nagios_client02 tools] # tar zxvf hd2u-1.0.0.tgzhd2u-1.0.0/hd2u-1.0.0/configurehd2u-1.0.0/dos2unix.chd2u-1.0.0/NEWShd2u-1.0.0/config.h.inhd2u-1.0.0/packaging/hd2u-1.0.0/packaging/hd2u.spechd2u-1.0.0/CREDITShd2u-1.0.0/configure.inhd2u-1.0.0/READMEhd2u-1.0 .0 / COPYINGhd2u-1.0.0/AUTHORShd2u-1.0.0/install-shhd2u-1.0.0/INSTALLhd2u-1.0.0/Makefile.inhd2u-1.0.0/TODOhd2u-1.0.0/ ChangeLog [root @ nagios_client02 tools] # cd hd2u- 1.0.0 [root @ nagios_client02 hd2u-1.0.0] #. / configureConfiguring hd2u 1.0.0checking for gcc... Gccchecking for C compiler default output file name... A.outchecking whether the C compiler works... Yeschecking whether we are cross compiling... Nochecking for suffix of executables... Checking for suffix of object files... Ochecking whether we are using the GNU C compiler... Yeschecking whether gcc accepts-g. Yeschecking for gcc option to accept ANSI C... None neededchecking for a BSD-compatible install... / usr/bin/install-cchecking for getopt_long in-lpopt... Noconfigure: error: * * libpopt not found

Configuration error.

[root@nagios_client02 hd2u-1.0.0] # makemake: * * No targets specified and no makefile found. Stop.

There is also a problem with the compilation.

Download the popt-1.14-2rt.x86_64.rpm package on the http://rpm.pbone.net/index.php3/stat/4/idpl/17960519/dir/other/com/popt-1.14-2rt.x86_64.rpm.html" page.

On the open page, right-click the "popt-1.14-2rt.x86_64.rpm" link and select "copy Link address" from the pop-up shortcut menu to download the package using the wget command in the linux environment.

[root@nagios_client02 hd2u-1.0.0] # wget ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/r/ro/roblinux/64-32_pkg/base/x86_64/popt-1.14-2rt.x86_64.rpm--2014-09-07 00Rose 09Rose 30Rose-ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/r/ro/roblinux/64-32_pkg/base/ X86_64/popt-1.14-2rt.x86_64.rpm = > `popt-1.14-2rt.x86_64.rpm'Resolving ftp.pbone.net... 85.14.85.4Connecting to ftp.pbone.net | 85.14.85.4 |: 21. Connected.Logging in as anonymous... Logged inexperienced persons = > SYST... Done. = > PWD... Done.== > TYPE I... Done. = > CWD (1) / mirror/ftp.sourceforge.net/pub/sourceforge/r/ro/roblinux/64-32_pkg/base/x86_64... Done.== > SIZE popt-1.14-2rt.x86_64.rpm... 75973 PASV. Done. RETR popt-1.14-2rt.x86_64.rpm... Done.Length: 75973 (74K) (unauthoritative) 100% [= >] 75973 7.21K/s in 10s 2014-09-07 00:10:30 (7.21 KB/s)-`rpm' saved [75973] # ll popt-1.14- 2rt.x86mm 64.rpm' saved [75973] [root@nagios_client02 hd2u-1.0.0] # ll popt-1.14- 2rt.x86mm 64.rpmmuri rwmurf-1 root root 75973 Sep 7 00:10 popt-1.14- 2rt.x8664.rpm [root @ nagios_client02 hd2u-1.0.0] # mv popt-1.14-2rt.x86_64.rpm. / [root@nagios_client02 hd2u-1.0.0] # cd. [root@nagios_client02 tools] # ll popt-1.14-2rt.x86y64.rpm Rwkowitz-1 root root 75973 Sep 7 00:10 popt-1.14-2rt.x8664.rpm [root @ nagios_client02 tools] # Rpm-ivh popt-1.14-2rt.x86-64.rpmsigning. # [100%] package popt-1.14-2rt.x86_64 is intended for a x86 2rt.x86_64 conflicts with file from package popt-1.13 64 architecture file / usr/share/locale/cs/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6 .i686 file / usr/share/locale/da/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/de/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/es/LC_MESSAGES/popt .mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/fr/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/ga/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from Package popt-1.13-7.el6.i686 file / usr/share/locale/gl/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/hu/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share / locale/is/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/it/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/ja/LC_MESSAGES/popt.mo from install of popt-1.14 -2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/ko/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/nb/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6 .i686 file / usr/share/locale/nl/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/pl/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/pt/LC_MESSAGES/popt .mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/ro/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/ru/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from Package popt-1.13-7.el6.i686 file / usr/share/locale/sk/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/sl/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share / locale/sv/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/tr/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/uk/LC_MESSAGES/popt.mo from install of popt-1.14 -2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/vi/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686 file / usr/share/locale/wa/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6 .i686 file / usr/share/locale/zh_CN/LC_MESSAGES/popt.mo from install of popt-1.14-2rt.x86_64 conflicts with file from package popt-1.13-7.el6.i686

From the output, it is found that this package should be for a 64-bit system, while the RHEL in the virtual machine is a 32-bit system. There is also a problem with the installation.

[root@nagios_client02 tools] # cd hd2u- 1.0.0 [root @ nagios_client02 hd2u-1.0.0] #. / configureConfiguring hd2u 1.0.0checking for gcc... Gccchecking for C compiler default output file name... A.outchecking whether the C compiler works... Yeschecking whether we are cross compiling... Nochecking for suffix of executables... Checking for suffix of object files... Ochecking whether we are using the GNU C compiler... Yeschecking whether gcc accepts-g. Yeschecking for gcc option to accept ANSI C... None neededchecking for a BSD-compatible install... / usr/bin/install-cchecking for getopt_long in-lpopt... Noconfigure: error: * libpopt not commands [root @ nagios_client02 hd2u-1.0.0] # makemake: * No targets specified and no makefile found. Stop. [root @ nagios_client02 hd2u-1.0.0] # make installmake: * No rule to make target `install'. Stop. [root @ nagios_client02 hd2u-1.0.0] # cd..

Configuration, compilation, and installation all reported errors.

I have also tried to find the 32-bit version of this package, but I don't know if there is a problem with the version found or the version number is inconsistent. All failed when the "rpm-ivh" command was executed.

An attempt to install dos2unix using yum was unexpectedly successful.

[root@nagios_client02 tools] # yum-y install dos2unix*Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.grandcloud.cn * extras: ftp.yzu.edu.tw * updates: mirrors.grandcloud.cnbase | 3 .7 kB 00:00extras | 3.3 kB 00:00updates | | 3.4 kB 00:00Setting up Install ProcessResolving Dependencies-- > Running transaction check--- > Package dos2unix.i686 0lv 3.1-37.el6 will be installed-- > Finished Dependency ResolutionDependencies Resolved= Package Arch Version | Repository Size=Installing: dos2unix i686 3.1-37.el6 base 15 kTransaction Summary=Install 1 Package (s) Total download size: 15 kInstalled size: 17 kDownloading Packages:dos2unix-3.1-37.el6.i686.rpm | 15 kB 00:00 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing: dos2unix-3.1-37.el6.i686 1 Verifying: dos2unix-3.1-37.el6.i686 1/1Installed: dos2unix.i686 0virtual 3.1-37.el6 Complete! [root@nagios_client02 tools] # whereis dos2unixdos2unix: / usr/bin/dos2unix / usr/share/man/man1/dos2unix. 1.gz [root @ nagios_client02 tools] # dos2unix / usr/local/nagios/libexec/check_memory.pldos2unix: converting file / usr/local/nagios/libexec/check_memory.pl to UNIX format... [root@nagios_client02 tools] # dos2unix / usr/local/nagios/libexec/check_iostatdos2unix: converting file / usr/local/nagios/libexec/check_iostat to UNIX format.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report