I can't load any webpage in browsers (mozilla and chrome).
Also i can't execute sudo apt update command, because my file /var/lib/apt/lists/lock locked by process 917.
But my computer has internet, because messengers like telegram is working.
And i can execute command ping -c5 8.8.8.8 and it loads packages fine.
Can someone help me please?
Regarding the issue with apt, you likely have another instance of apt running somewhere. You really don't want doing multiple operations on your system's packages at the same time so apt automatically sets a lock file (/var/lib/apt/lists/lock) to avoid that.
tl.dr. find the other running instance of apt and kill it if appropriate. If you cant find any (can happen sometimes), delete the /var/lib/apt/lists/lock file yourself (please see https://askubuntu.com/a/335801).
Related
I launched an Ubuntu 18.04 VM with Azure. I installed a bunch of stuff that I need. Then, I used the dashboard to create a custom image from this machine. After that, I checked that the image was okay by launching some machines with that image. Everything seemed to be working fine.
Today, I launched a new instance with my custom image. Then I tried to install a few things with apt-get install and I get the following error (e.g. for unzip):
sudo: unable to resolve host ABCDEFG: Resource temporarily unavailable
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package unzip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'unzip' has no installation candidate
This same thing happens for any package I try to install. After testing some basic things with my repositories, I checked the internet connection with ping. E.g. ping www.google.com which is also not working. I launched a vanilla Ubuntu 18.04 instance and I am not having these problems with that machine.
I have also tried sudo reboot but no luck with that. I did notice that when the system booted it shows the following error, also indicating that something is wrong with the internet:
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings
Any help is greatly appreciated.
So, after some digging around, I found this answer to something similar: https://askubuntu.com/questions/1045278/ubuntu-server-18-04-temporary-failure-in-name-resolution.
I used the following command and the internet started working again:
sudo ln -s ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
This is a little different than the answer on askubuntu because this is on an Azure image. First, I noticed that my image was missing resolv.conf in /etc. Using ls -la /etc/resolv.conf on a different azure image, I saw that it was a symbolic link to ../run/systemd/resolve/stub-resolve.conf, so I created a link that matched this format on my machine and that fixed things.
** EDIT **
It's worth noting that when you deprovision the VM to create the custom image, it does say:
WARNING! The waagent service will be stopped.
WARNING! Cached DHCP leases will be deleted.
WARNING! root password will be disabled. You will not be able to login as root.
WARNING! /etc/resolv.conf will be deleted.
WARNING! xxxx account and entire home directory will be deleted.
I had installed virtualmin on a RHEL system and a couple of very strange problems have cropped up.
Firstly, the Apache test page now says - powered by CentOS instead of RHEL. All the files and filesystems are intact therefore I am at a loss as to why it would report another version of linux altogether.
Secondly, my sudo access has been overwritten / removed after installation. It just comes up with a message that XXXX (username) does not have sudo access....etc
And lastly, trying to access the virtualmin page over the port 10000 is just returning an "unable to connect" error. [Since I am locked out of using sudo, I am at a loss of how to proceed].
Thank you in advance for your help.
The Apache package we ship is a rebuild of the SRPM from CentOS. The default page is simply an HTML file...it is not "reporting" anything, really, except that you haven't setup any websites yet. On CentOS/RHEL Apache has to be rebuilt in order to support virtual servers in /home when using suexec. So, this is expected behavior and no reason for alarm. We used to ship a custom error page instead (with Virtualmin logo instead of CentOS, but the patch broke a while back and I never got around to fixing it...might go back to that next time we roll an Apache update).
Virtualmin did not touch your sudoers file. That problem is unrelated to the Virtualmin installation. (I wrote the install.sh and the virtualmin-base package; I'm 100% certain your sudoers issue is unrelated to Virtualmin). I don't have any guesses about what went wrong there, or how to fix it if you don't have any way to access the machine as root (rebooting into single user mode would be the right thing if you have hardware access or can get access via a KVM from your hosting provider/colo).
We would need to see the last few dozen lines of the install log to know what went wrong with the Virtualmin installation, and why Webmin failed to start.
Since last day I am getting issue(see link) with the Upwork. Many times I have reinstall the Upwork and restart the system but nothing goes happen.The network connection is also fine.I google but got nothing helpful. Anyone can suggested me how can I fix the issue. and make the Upwork run correctly.
As I remember the Upwork is running fine, I am getting the issue, since I run the command 'sudo restart lightdm' to display time on menu bar.
Please follow the below link and steps to fix up-work issue.
https://community.upwork.com/t5/Freelancers/Error-Message-THERE-WAS-A-PROBLEM-LOADING-UPWORK/td-p/83016/page/3
sudo dpkg -i libnss
wget http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.19.2-1ubuntu1_i386.deb
sudo dpkg -i libnss3_3.19.2-1ubuntu1_i386.deb
Upwork fixed.
Note : These issues we are getting if we do not close the up-work properly while shutting down the operating system. Please remember this things.
I have a situation where I need to run yum from a site that has a slow "about 50kbps" intermittent connection. For packages smaller than 40M (our unscientifically determined threshold) yum seems to eventually get the job done but anything larger will eventually stall out and not work. So far I haven't been able to figure out the magical configuration to get this working properly. I'd like to know if anyone has some suggestions on what I could do to fix this.
You might try using yumdownloader to retrieve the rpm(s), and then yum to install the already downloaded rpms.
I'm trying to run the time command for a file on a virtual machine running Fedora 19 64-bit and I get the message "/usr/bin/time: No such file or directory". I tried googling, but it appears it's something that I should already have. How do I get this on my computer?
For those on a raspberry pi or similar debian-based distributions, I found that I could install the package time (sudo apt install time) to obtain access to the time command.
Edit: For Fedora-based systems, the package name might be different. Try a dnf search time, followed by a sudo dnf install {package_name}. I don't have a Fedora machine immediately to hand to get the exact package name from.
bash/zsh/modern shells usually implement a basic time command as a builtin. So it won't exist on the filesystem, but time mycommand should work.
If you want the "proper" time command (with more options eg: -l/-v), then you'll need to install it via apt/yum/etc. You'll need to run it as /usr/bin/time mycommand so the shell-builtin doesn't get invoked.
It might be in other locations. I'd start by typing:
which time
This command will give you the path to time, if it's anywhere in your path.
If you need to build it yourself, you can get the source here:
http://directory.fsf.org/wiki/Time