Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi I purchased a cheap eMachine laptop (with the lil' gimpy atom processor) and it had windows 7 on it, but unfortunately it was very sluggish. So a coworker told me about linux and gave me a live USB of his and instructed me on how to install it onto my laptop.
Well I took it a step further and got rid of windows altogether which I now regret because I can't play a lot of games now, but I digress.
I've never used linux and I had heard that if you learned how to use the command prompt to operate the system you could perform tasks much quicker and whatnot so I started messing around with commands and the first thing I tried to accomplish was changing my name inside the command prompt. And I was successful, kinda. The system is called "linuxlite" and I changed my name to "MrBojangles". Unfortunately since I have done this it won't let me download anything from ubuntu, the web nada. I also get error messages on startup claiming that there is a problem with a checkbox to send the information off somewhere.
Unfortunately as well, I messed this up several months ago and just forgot about it and now I really want to get linux puppy and other operating systems (because why not they're usually not bigger than 2gb anyways), but I can't download anything other than maybe a picture off the internet.
But yeah when I try to install anything through the command prompt (apt-get install ****) it says: E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
linuxlite@Mr:~$
Does anyone know how I can fix this? Or maybe reset the operating system to the original settings?
Also sometimes it will ask me for an administrator password to do certain things like I think I wanted to install a game off of steam (even though I knew it probably wouldn't work out) it would ask me for this password and it was never right. I mean there's only one password created on this computer and I am the administrator so how can I be wrong?
sudo apt-get install w3m <---I picked this arbitrarily. What's important is what happens when you try the command. w3m is a text web browser.
and let us know what happens.
I say that because LinuxLite is based on Ubuntu, and Ubuntu has a somewhat unusual implementation of sudo. The "root" user ("super user," "administrator") is hidden in Ubuntu. Instead of using "su" ("substitute user") to become root to do administrative tasks, one uses "sudo" (which, in UbuntuLand, means "Super User do"). Sudo will then ask for your user password and, once it is correctly entered, will execute the administrative task. And don't worry about those semantics, at least not yet. Let's just try something.
linuxlite@Mr:~$ sudo apt-get install w3m
sudo: unable to resolve host Mr.Bojangles
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libnss3-1d : Depends: libnss3 (= 2:3.19.2-0ubuntu0.14.04.1) but 2:3.17.4-0ubuntu0.14.04.1 is to be installed
libnss3-nssdb : Depends: libnss3 (= 2:3.19.2-0ubuntu0.14.04.1) but 2:3.17.4-0ubuntu0.14.04.1 is to be installed
libqt4-declarative : Depends: libqtgui4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed
libqt4-opengl : Depends: libqtgui4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed
libqt4-svg : Depends: libqtgui4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed
libqtgui4 : Depends: libqt4-declarative (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
Depends: libqtcore4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Error messages are your friend. They tell you what went wrong and where to start looking for a fix.
Try running
Code:
sudo apt-get -f --followed by
sudo apt-get clean
then retry installing w3m (which is quite a nice piece of work, by the way) and report back. (I'm probably done for the night, but someone else will pop up to help.)
Would my problem be that because I changed my hostname (to mrbojangles) that the system no longer recognizes me as the administrator? I tried reinstalling w3m and it says "unable to resolve host mrbojangles" so I tried sudo leafpad /etc/mrbojangles - it opened the notepad up but warned me that: The owner of /home/linuxlite/.config/ibus/bus is not root!
Last edited by MrBojanglee; 12-01-2015 at 03:26 PM.
Would my problem be that because I changed my hostname (to mrbojangles) that the system no longer recognizes me as the administrator?
Quote:
Code:
sudo: unable to resolve host Mr.Bojangles
How, exactly, did you change the name on your system? Whatever you did, it was wrong, and that's what has broken your network connection. If you know what you did, I recommend you undo it. If you don't know what you did, I recommend you take better notes when you make changes to the system.
Last edited by suicidaleggroll; 12-01-2015 at 03:38 PM.
I just found the exact command. I saved it in a notepad. The command was "sudo gedit /etc/hostname" When I try using the command again it says this:
udo: unable to resolve host linuxlite
Invalid MIT-MAGIC-COOKIE-1 key
** (gedit:2729): WARNING **: Could not open X display
Invalid MIT-MAGIC-COOKIE-1 keyerror: XDG_RUNTIME_DIR not set in the environment.
(gedit:2729): Gtk-WARNING **: cannot open display: :0.0
Last edited by MrBojanglee; 12-01-2015 at 04:29 PM.
You said above that you changed the hostname to mrbojangles, but your output implies you used Mr.Bojangles. Periods are only allowed in hostnames when they serve to delimit components of a domain name.
Since you can't open X applications, how about editing it with one of the command line text editors (vi, pico, nano, etc.)? Just remove the period from it, the rest should be fine, and see if that fixes your problem.
Apparently having a period in the hostname can mess with DNS.
Last edited by suicidaleggroll; 12-01-2015 at 04:49 PM.
Alright my hostname is now linuxlite. I still can't download anything from ubuntu or the internet and I'm still getting error messages it also tells me when I try to install the web browser w3m (sudo apt-get w3m) "unable to resolve host linuxlite"
And yeah everything was fine up until I changed my hostname. I also noticed that ubuntu won't update and I cleaned my cache and tried to force all unneeded dependencies to be removed.
It said for the first one that no file or directory exists...
The second one said this (I changed my name back to MrBojangles but without the period):
27.0.0.1 MrBojangles
127.0.1.1 MrBojangles
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
For the third one:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
nameserver 127.0.1.1
search hsd1.tx.comcast.net
And then the fourth one:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.