LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Synaptic reports error upon starting (http://www.linuxquestions.org/questions/linux-software-2/synaptic-reports-error-upon-starting-779647/)

Elixer 01-04-2010 12:07 AM

Synaptic reports error upon starting
 
Recently I tried to install a program with Synaptic and it now reports

"E: ERROR: could not create configuration directory /home/root/.synaptic - Recently (2 No such file or directory)"

Any idea what is wrong?. I used synaptic a few days ago with no issues. I am relatively new to Linux. Thanks, Jon

evo2 01-04-2010 12:11 AM

What distro are you using? And how are you starting synaptic?

Evo2.

Elixer 01-04-2010 11:48 PM

Hello Evo2, I am using Debian Lenny with the default Gnome desktop. I have only started Synaptic through the Gnome desktop and has worked perfectly up to now. Synaptic does prompt me for root password and accepts it when I try to run it. The Default Gnome dsktop also provides annother utility to install programs called "Add/Remove Aplications" Before this problem I have not used it as I am familiar with Synaptic. I just tried installing a test program with "Add/Remove Applications" just before writing to you and it also reports the same message.

One could only imagine that the operating system is not allowing this directory to be created. I have used Synaptic several times and one would expect this directory would exist. I have checked in the /home directory and there are only 2 directories. The 2 directories are the 2 users of the system, jon and jill which of couse have plenty of sub directories and files in them.

On my system synaptic is located in /root/.synaptic. Inside .synaptic directory there are the follwing files. lock, lock.non-interactive, log, options, synaptic.conf. I hope this info will shed some light. Your help always appriciated, Jon

Ok, did some more thinking on what could have caused this problem. The only thing that comes to mind is me changing the ownership of a file using chown. I typed the code in wrong several times. I was not familiar and may have inadvertantly changed ownership of something by accedent although I do not think so. The file I was changing ownership on was located in Desktop so I dont realy think this is why. figure I should give all info I can think of. Thanks again, Jon

evo2 01-05-2010 12:21 AM

"/home/root/" should not (normally) exist. The root home directory is simply "/root". It is quite strange that synaptic is looking in "/home/root".

I don't use synaptic, so I'm not sure of how much help I can be. However you might get more usefull errors messages if you start synaptic from the command line. Please open a terminal, run the following commands and post their output:

Code:

whoami
echo $HOME
su
whoami
echo $HOME
grep ^root /etc/passwd
synaptic

Cheers,

Evo2.

Elixer 01-06-2010 12:32 AM

messed up here and cant erase it

Elixer 01-06-2010 01:06 AM

Hello Evo2, I get the exact same results using the command prompt. With my very limited expereance with Debian Lenny and Xandros I have to agree with your thoughts on /root and not /home/root. I have checked and made sure /root is in the proper place. Remember it is not just Synaptic that is doing this it is also the other app install program "Add\Remove Programs" that comes as default when you install Debian Lenny.

Although I can not be 100% positive I realy do not think I have done something to the system to cause this issue. I have not changed any configuration files other than my daughters save game file located as follows home/jon/.macromedia/Flash_Player/#SharedObjects/SUZEAMJF/#localWithNet/home/jon/Desktop/Games/Machinarium/Machinarium/Machinarium.sol. I also needed to use chown to change the ownership to my new user name on the Debian Lenny system. Agian I do not believe I messed anything up doing so but it was in the time period between when I ast used Synaptic and when I discoverd it did not work. Thanks for your paitence with me, Jon

evo2 01-06-2010 02:31 AM

Quote:

Originally Posted by Elixer (Post 3815806)
Hello Evo2, I get the exact same results using the command prompt.

So could you post the output please? I included a bunch of commands there that may output things that could possibly help debug the problem.

Evo2.

Elixer 01-06-2010 07:16 AM

Here is what is reported. It is identical to using synaptic and "Add/Remove Programs" from the Gnone desktop.

E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

There were no commands included in the last corrospondance.

I could only imagine that both Synaptic and "Add/Remove Programs use the same Linux program but just offer a graphical interface. If this be the situation and both use something like apt-get, perhaps there is a configuration file associated with this said program. If that is fouled up somhow it could be giving me the problem. Is there a safe way for me to use apt-get (or other) to try to install a sample application just to verify where the start of the problem is? Thanks, so much.Jon

evo2 01-06-2010 08:26 AM

In post #4 I gave a list of commands to enter into a terminal. Please run them and post the output.

Evo2.

Elixer 01-07-2010 12:02 AM

Ok I get it now, here is the code typed in line by line. After line # 3 "su" I did enter my password. I hope this is what you wanted as it only makes sence.

jon@debianlenny:~$ whoami
jon
jon@debianlenny:~$ echo $HOME
/home/jon
jon@debianlenny:~$ su
Password:
root@debianlenny:/home/jon# whoami
root
root@debianlenny:/home/jon# echo $HOME
/home/root
root@debianlenny:/home/jon# grep ^root /etc/passwd
root:x:0:0:root:/home/root:/bin/bash
root@debianlenny:/home/jon# synaptic

And here is the pop up window contents that displays after the last command, synaptic

E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

Interestingly after typing in the command "grep ^root /etc/passwd we get " root:x:0:0:root:/home/root:/bin/bash" and there is no /home/root on my system and this comes up in the error message as well when trying to run synaptic.


Thanks so much, Jon

evo2 01-07-2010 12:13 AM

Ok, found the problem: it is really weird. In the /etc/passwd file roots home directory set as "/home/root/". The passwd file *defines* the home directory, so synaptic is doing nothing wrong. Somehow your /etc/passwd file got screwed up. Do you have any idea how this happened?

Evo2.

evo2 01-07-2010 12:22 AM

Anyway I think you can fix the problem using the following command(s):

Code:

su
usermod --home /root root

Cheers,

Evo2.

Elixer 01-09-2010 12:11 AM

Everything back to normal now, thanks very much.

Now, how did this happen? Two things come to mind. I had the computer crash 2 times in a row requiring a reboot when I switched users with the Gnome "switch user" icon in the menu bar. This happened in that time frame when this problem came about. I do not recall the events as to what I was doing but there were several open programs running when this happened. The other possibility may be when I was messing with the menu bar icons. At one point several of the icons I introduced would not function so I deleted them and then reinstalled and things are fine now. One was " user switcher"
One would imagine for this to get messed up I would need be at the command prompt with root privileges and type some command like privileges or something. This I definitely have not done. Jon

evo2 01-09-2010 12:20 AM

I can't imagine how any of the things you described could have made that change to /etc/passwd. Anyway in the process of fixing this it seems you've learned a little more about your system which will hopefully help you if (when) other things go wrong in the future.

Glad I could help solve your problem.

Cheers,

Evo2.

sofcrafts 01-24-2010 08:59 PM

Hi EVo2

Many thanks for the post -- I had a similar issue. Your solution :

usermod --home /root root

worked great.

I installed Lenny 5.0 on a and during setup just choose simple password for root as I knew I can change it later via the gnome gui.

After installation I changed the password in the gui and thats when the synaptic fault started.

Your help much appreciated.

Cheers


All times are GMT -5. The time now is 11:46 AM.