LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2018, 06:00 AM   #1
sub320
Member
 
Registered: Jan 2016
Posts: 116

Rep: Reputation: 3
is it the internet connection problem


I tried to use the command "go get -u github.com/gogits/gogs" , but got the below result , is it the internet connection problem or other reason , but I can install package by "yum install package_name" , would what is the reason that I can not use the above command ?

fatal: unable to access 'https://github.com/gogits/gogs/' Could not resolve host: github.com; unknow error
package github.com/gogits/gogs: exit status 128

Last edited by sub320; 05-29-2018 at 04:42 AM.
 
Old 05-28-2018, 06:17 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: Currently OpenMandriva. Previously openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,436

Rep: Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781
Quote:
Originally Posted by sub320 View Post
I tried to use the command "go get -u github.com/gogits/gogs" , but got the below result , is it the internet connection problem or other reason , but I can install package by "yum install package_name" , would what is the reason that I can not use the above command ?

fatal: unable to access 'https://github.com/gogits/gogs/' Could not resolve host: github.com; unknow error
package github.com/gogits/gogs: exit status 128
Based on the fact you refer to the "yum" command, I'm assuming you're using CentOS/RHEL/etc ?

Try the following command:

Code:
ping 8.8.8.8
If that works, it's likely just a DNS issue and you need to therefore make sure that you have a DNS server listed in your /etc/resolv.conf file.

To check "resolv.conf" type the following:

Code:
cat /etc/resolv.conf

Last edited by jsbjsb001; 05-28-2018 at 06:19 AM. Reason: typo
 
Old 05-28-2018, 09:34 PM   #3
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by jsbjsb001 View Post
Based on the fact you refer to the "yum" command, I'm assuming you're using CentOS/RHEL/etc ?

Try the following command:

Code:
ping 8.8.8.8
If that works, it's likely just a DNS issue and you need to therefore make sure that you have a DNS server listed in your /etc/resolv.conf file.

To check "resolv.conf" type the following:

Code:
cat /etc/resolv.conf
I can't ping 8.8.8.8 , the /etc/resolv.conf point to our DNS server correctly , I use vmware , bridged mode .

I tried the below command , it seems work fine to use nslookup to find host where 10.20.1.14 is my dns server .
# nslookup www.google.com
Server: 10.20.1.14
Address: 10.20.1.14#53

Non-authoritative answer:
Name: www.google.com
Address: 74.125.204.104
Name: www.google.com
Address: 74.125.204.147
Name: www.google.com
Address: 74.125.204.105
Name: www.google.com
Address: 74.125.204.99
Name: www.google.com
Address: 74.125.204.103
Name: www.google.com
Address: 74.125.204.106

But I can't ping www.google.com or 74.125.204.104 , what is the problem of my internet connection ?

thanks
 
Old 05-28-2018, 10:01 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
try 'ip addr' to see if the interface is configured.
 
Old 05-28-2018, 11:03 PM   #5
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
In the path /etc/sysconfig/network-scripts , there are ens33 and virbr0 files , no eth0 , is it normal ?

the file content as below .
ens33
=====
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=1eda647b-09cb-49db-bcef-812aeba61a3a
DEVICE=ens33
ONBOOT=yes

virbr0
======
STP=yes
DELAY=2
BRIDGING_OPTS=priority=32768
TYPE=Bridge
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV4_DNS_PRIORITY=100
IPV6INIT=no
NAME=virbr0
UUID=d4718c79-3128-4a8e-b59f-bf1bb2f36752
DEVICE=virbr0
ONBOOT=no
 
Old 05-29-2018, 02:36 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,390
Blog Entries: 9

Rep: Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654
Quote:
Originally Posted by sub320 View Post
I can't ping 8.8.8.8
...
But I can't ping www.google.com
can't you just show us the ping output?
and maybe it has a verbose option (though not too verbose please).
 
Old 05-29-2018, 03:24 AM   #7
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by ondoho View Post
can't you just show us the ping output?
and maybe it has a verbose option (though not too verbose please).
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

Last edited by sub320; 05-29-2018 at 03:38 AM.
 
Old 05-29-2018, 06:12 AM   #8
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
ping www.google.com is also not work
# ping www.google.com
PING www.google.com (74.125.204.105) 56(84) bytes of data.
 
Old 05-29-2018, 07:33 AM   #9
mbzn
LQ Newbie
 
Registered: Dec 2007
Location: Secunda, south africa
Distribution: MX Linux 17.1
Posts: 24

Rep: Reputation: 1
Hi sub320 after running ping for about a minute press Ctrl+c this will end the process, please post the output of the last lines is prints.
 
Old 05-29-2018, 10:30 AM   #10
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
ens33 is the network interface. vibr0 is the network bridge. You might check to see if the interface has an ip.
 
Old 05-29-2018, 11:13 PM   #11
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by mbzn View Post
Hi sub320 after running ping for about a minute press Ctrl+c this will end the process, please post the output of the last lines is prints.
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5010ms
 
Old 05-29-2018, 11:15 PM   #12
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
# ping www.google.com
PING www.google.com (108.177.97.147) 56(84) bytes of data.
^C
--- www.google.com ping statistics ---
76 packets transmitted, 0 received, 100% packet loss, time 75134ms
 
Old 05-29-2018, 11:21 PM   #13
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by AwesomeMachine View Post
ens33 is the network interface. vibr0 is the network bridge. You might check to see if the interface has an ip.
I use dhcp , is it the reason of the internet connection problem ?
 
Old 05-30-2018, 04:55 AM   #14
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
I have another installation problem as below , I have the problem to run the below command ( it is strange that I can yum install package ) , would advise what is wrong in my centos , it it have problem in internet connection ?

#go get -u github.com/gogits/gogs

# cd .; git clone https://github.com/gogits/gogs /home/git/go/src/github.com/gogits/gogs
Cloning into '/home/git/go/src/github.com/gogits/gogs'...
fatal: unable to access 'https://github.com/gogits/gogs/': Failed connect to github.com:443; Operation now in progress
package github.com/gogits/gogs: exit status 128
 
Old 05-30-2018, 06:02 AM   #15
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
I thank I can yum package is because I have configure /etc/yum.conf

but now I want to use the command 'go get' to connect internet , it is not work .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration