Active Topics

 


Reply
Thread Tools
Posts: 1 | Thanked: 0 times | Joined on Aug 2010
#1
Code:
Nokia-N900:~# apt-get install samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up samba-common (3.4.3-maemo2) ...
dpkg (subprocess): unable to execute post-installation script: No such file or directory
dpkg: error processing samba-common (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 samba-common
E: Sub-process /usr/bin/dpkg returned an error code (1)


solution?
 
dchky's Avatar
Posts: 549 | Thanked: 299 times | Joined on Jun 2010 @ Australian in the Philippines
#2
The solution is to open up your most favorite text editor and remove the silly windows LF/CR from the end of each line. Someone borked up - People still use Microsoft? : )

In simple terms ^M is spamming the scripts.

Both of the following files have this issue:

/var/lib/dpkg/info/samba-common.postinst
/var/lib/dpkg/info/samba-common.postrm

Once you remove the ^M from the end of every line, it will both install and remove correctly. It's quite probable that the other samba-common files in this directory are also having the same problem - though I didn't check.
 

The Following 2 Users Say Thank You to dchky For This Useful Post:
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#3
would there be a program or even a command in the terminal, to automaticly fix that?
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#4
Originally Posted by TiagoTiago View Post
would there be a program or even a command in the terminal, to automaticly fix that?
There is a package "tofrodos" but I don't see it in M5 repositories.
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#5
it sounds like somthing that could be done using regex (i only understand regex enough to see the potential, but i have no idea how to actually use them)
 
Posts: 11 | Thanked: 2 times | Joined on Jan 2010
#6
Originally Posted by dchky View Post
The solution is to open up your most favorite text editor and remove the silly windows LF/CR from the end of each line. Someone borked up - People still use Microsoft? : )

In simple terms ^M is spamming the scripts.

Both of the following files have this issue:

/var/lib/dpkg/info/samba-common.postinst
/var/lib/dpkg/info/samba-common.postrm

Once you remove the ^M from the end of every line, it will both install and remove correctly. It's quite probable that the other samba-common files in this directory are also having the same problem - though I didn't check.
Hi there, I'm having this problem with smbfs and samba-common failing to configure, meaning they also fail when trying to remove them.

While I partly understand your instructions (have opened the two files you mentioned using a text editor) I don't know what you mean by ^M, and can't see anything of the sort anywhere in either file! Is ^M some sort of "code" or designation?
 
dchky's Avatar
Posts: 549 | Thanked: 299 times | Joined on Jun 2010 @ Australian in the Philippines
#7
Originally Posted by Chaos Defines Order View Post
Hi there, I'm having this problem with smbfs and samba-common failing to configure, meaning they also fail when trying to remove them.

While I partly understand your instructions (have opened the two files you mentioned using a text editor) I don't know what you mean by ^M, and can't see anything of the sort anywhere in either file! Is ^M some sort of "code" or designation?
Now that I read my message again I wasn't very clear. : )

The configuration files have been edited at some point in a text application that leaves ^M at the end of every line. (It's an extra carriage return that you can't ordinarily see)

Probably another way to remove them is to hit "File -> Save As" and select "ASCII" or some similar raw text format.

I use vi for pretty much all my editing so I can't really offer solutions that fall outside this particular editor.

If you google "remove ^M" there are quite a few solutions.
 
Posts: 992 | Thanked: 738 times | Joined on Jun 2010 @ Low Earth Orbit
#8
Make a copy of the files first:
cp /var/lib/dpkg/info/samba-common.postinst /var/lib/dpkg/info/samba-common.postinst.bak
cp /var/lib/dpkg/info/samba-common.postrm /var/lib/dpkg/info/samba-common.postrm.bak
Then remove the silly CRs
tr -d '\r' < /var/lib/dpkg/info/samba-common.postinst.bak > /var/lib/dpkg/info/samba-common.postinst
tr -d '\r' < /var/lib/dpkg/info/samba-common.postrm.bak > /var/lib/dpkg/info/samba-common.postrm
 

The Following 5 Users Say Thank You to kureyon For This Useful Post:
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#9
i tried doing that but nothing seems to have changed
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#10
hm, actually, it seems it worked, nvm my last post
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:43.