How Do You Troubleshoot a C++ Program That Will Not Compile Due to Undefined Reference Errors?

Problem scenario: You try to compile a C++ program with gcc, but you get this output:

/tmp/ccj6eKDl.o: In function `main’:
q.cpp:(.text+0x14): undefined reference to `std::cout’
q.cpp:(.text+0x19): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)’
q.cpp:(.text+0x28): undefined reference to `std::cout’
q.cpp:(.text+0x2d): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)’
/tmp/ccj6eKDl.o: In function `__static_initialization_and_destruction_0(int,

How Do You Troubleshoot Installing Oracle VirtualBox Guest Additions on a CentOS Server?

Problem scenario
You are running Oracle VirtualBox on a Windows host.  You have Linux CentOS guest server.  Guest additions fails to install.  You tried to run this script VBoxLinuxAdditions.run.  The run fails with an error saying “
check /var/log/VBoxGuestAdditions.log for details.”

You examined /var/log/VBoxGuestAdditions.log, and it said this:
“vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc,

How Do You Permanently Change the Hostname of a Linux CentOS Server?

Problem scenario:  You edited the /etc/hosts file and the /etc/sysconfig/network file to have a new hostname. You used the “hostname newHostname” command (where newHostname is the desired new host name). You rebooted the server and the hostname is still localhost.localdomain. How do you configure the host name to be different?

Solution
None of the above steps were necessary for changing the hostname for the purposes of having the “hostname” command return a new hostname. 

How Do You Find the Network Interface Name of a CentOS 7.X Server That Will Connect to the Default Gateway of Your Network?

Problem scenario:  You want to find the name of the network interface that can connect to the default gateway on your Linux CentOS 7.x server.  Typical new deployments of CentOS 7.x using the minimal .ISO do not have the “route” utility nor the “ifconfig” utility installed.  How do you find the interface’s name (e.g., eth0) without using the “route” command? 

When Running Oracle VirtualBox on a Windows Host with a Linux Guest, What Does the Linux Guest Think Is the IP Address of the Host?

Problem scenario:  You have Oracle VirtualBox installed on a Windows host.  You have Linux CentOS as a guest VM. You want to test network connectivity (e.g., hostname resolution).  You want to know what IP address the Linux guest could use to interact with the Windows host.

Solution
Install traceroute with this command:

sudo yum -y install traceroute

Then use this command:

traceroute 8.8.8.8

The results of the above traceroute command will show you the packet hop from the Linux guest to the Windows host. 

How Do You Install Docker on an AWS Instance of RHEL?

UPDATE: If you are using RHEL 8.x use these directions instead of the ones below.

Problem scenario
You want to install Docker on an AWS instance of RedHat Linux (version 7.x or below).  You do not want to use CentOS packages.  What do you do?

Solution
For RedHat Linux running via AWS, you have to run one command to enable numerous yum repositories. 

How Do You Configure Updates for a RedHat Server Running on AWS?

Question:  How Do You Get Yum Repositories to Work with a AWS Instance of RHEL?
Problem scenario:   You are using RedHat Linux via AWS and very few yum commands work.  The repositories are very limited, and few packages are available.  When trying to use yum to install packages, you see output like this:

“Loaded plugins: amazon-id, rhui-lb

No package lynx available.

How Do You Troubleshoot Yum Commands Not Working with the Error “Could Not Resolve Host: mirror.centos.org Unknown Error”?

Problem scenario:  Yum commands to install packages are not working.  When you use “yum install coolpackage” you get an error like this:


http://mirror.centos.org/altarch/7/os/i386/repodata/repomd.xml: [Errno 14] curl#6 – “Could not resolve host: mirror.centos.org; Unknown error”
Trying other mirror.
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] curl#6 – “Could not resolve host: yum.dockerproject.org; Unknown error”
Trying other mirror.


 One of the configured repositories failed (Docker Repository),

When Did Automation Become an Important Concept to Businesses?

Question
When did automation become a division or a department in a business?  When did the term automation start to be used regularly?

Answer
A competitive market will push companies to be competitive.  With the conclusion of World War 2, America transitioned to a peace time economy.  Detroit stopped producing large numbers of tanks and started producing large numbers of cars.  1947 was the year Ford created its automation department (www.assemblymag.com).