Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine.

简单翻译一下,不能获取本地地址,最可能原因是这个机器的网络配置错误

那么我们找找/etc/hosts配置

我的打开之后如下

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

 

下来我们需要增加配置

 

增加之后如下图

 

 其中192.168.14.131为本机地址,linux-r4b1为主机名,其中主机名就是root用户登录后@符号后面的显示,

如用weblogic用户登录显示如weblogic@linux-r4b1:

切换root用户登录显示如linux-r4b1: