LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-17-2020, 07:22 AM   #1
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Rep: Reputation: Disabled
bash-completion: line 1779: syntax error


I have a SNAFU on my Ubuntu 19.10.

Code:
Last login: Wed Jun 17 08:32:01 2020 from 10.0.1.50
-bash: /usr/share/bash-completion/bash_completion: line 1779: syntax error near unexpected token `('
-bash: /usr/share/bash-completion/bash_completion: line 1779: `    offseT==�    for (( i=1; i |= COMP_CWORD; i++ )); do
                                                                                                                               i& [[ "${COMQ__ORDS[i]}" != -* ]]; then'
-bash: /usr/share/bash-completion/bash_completion: line 1779: syntax error near unexpected token `('
-bash: /usr/share/bash-completion/bash_completion: line 1779: `    offseT==�    for (( i=1; i |= COMP_CWORD; i++ )); do
                                                                                                                               i& [[ "${COMQ__ORDS[i]}" != -* ]]; then'

Code:
sudo apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [107 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [98.3 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
Fetched 312 kB in 6s (56.3 kB/s)
Reading package lists... Error!
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease  The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Problem parsing dependency 21 of copyu:none=3.10.0-1
E: Error occurred while processing copyu (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_universe_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.

Code:
sudo pvdisplay
[sudo] password for user: 
  Internal error: _cfg_def_make_path: supplied buffer too small for dmeventd/vdo_comeanThe plugin runs comm�nd with eash"5% increment when VDO pooh volume*gets above 50%.
CommCnd whicj s|arts wi4h 'lvm '!prefix is intern!l lve command.
You can write your own jandler to cusuomise behaviour in more
Segmentation fault

so the first question here is, what should I fix first

What I did so far:

Code:
sudo apt install bash-completion
[sudo] password for user: 
Reading package lists... Error!
E: Problem parsing dependency 21 of copyu:none=3.10.0-1
E: Error occurred while processing copyu (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_universe_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.
sudo apt install --reinstall bash-completion
Reading package lists... Error!
E: Problem parsing dependency 21 of copyu:none=3.10.0-1
E: Error occurred while processing copyu (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_universe_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.

Last edited by linuxUser247; 06-17-2020 at 07:48 AM.
 
Old 06-17-2020, 07:28 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
the file bash_completion is corrupt. Probably you need to replace it with an empty version.
Next you need to make apt update work. probably an apt clean will help, probably it will be solved automatically and apt update will work next time.
When apt update works you can try to reinstall bash-completion.
 
2 members found this post helpful.
Old 06-17-2020, 08:03 AM   #3
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
the file bash_completion is corrupt. Probably you need to replace it with an empty version.
got it. Here is what I did:

Code:
sudo mv /usr/share/bash-completion/bash_completion ~/
sudo touch /usr/share/bash-completion/bash_completion
Quote:
Originally Posted by pan64 View Post
Next you need to make apt update work. probably an apt clean will help, probably it will be solved automatically and apt update will work next time.
apt clean did not resolve anything, unfortunately.

I found this very old answer:

https://unix.stackexchange.com/a/82782

and now, apt update is working.

Last edited by linuxUser247; 06-17-2020 at 08:06 AM.
 
1 members found this post helpful.
Old 06-17-2020, 08:14 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
that is good news. apt clean cannot restore those keys.
Would be nice to know how did it happen. It is quite unusual. Probably there are other damaged files around there.
 
Old 06-17-2020, 08:25 AM   #5
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
thank you for your help.

Quote:
Originally Posted by pan64 View Post
that is good news. apt clean cannot restore those keys.
Would be nice to know how did it happen. It is quite unusual. Probably there are other damaged files around there.
I am barely running anything on this system. The OS is almost virgem, there must be only one or two software tools I installed on it apart from default Ubuntu distro.

can you give me any tips for a health check?

The system is a raspberry pi with a SD card. I have no reason to believe the disk is failing, nor power issue, though.

after an upgrade, there was another failure:

Code:
Preparing to unpack .../20-libproxy1v5_0.4.15-10ubuntu1_armhf.deb ...
Unpacking libproxy1v5:armhf (0.4.15-10ubuntu1) over (0.4.15-10) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-p0kkSY/04-initramfs-tools-core_0.136ubuntu6.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Code:
1 package can be upgraded. Run 'apt list --upgradable' to see it.
a@naruto:~$ apt list --upgradable
Listing... Done
initramfs-tools-core/focal-updates 0.136ubuntu6.1 all [upgradable from: 0.136ubuntu6]
N: There is 1 additional version. Please use the '-a' switch to see it

Last edited by linuxUser247; 06-17-2020 at 08:33 AM.
 
Old 06-17-2020, 08:54 AM   #6
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
so far everything is working fine...
 
Old 06-17-2020, 09:02 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
In that case I would rather suggest you to reinstall it (in case of additional troubles).
 
2 members found this post helpful.
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line execution error: unexpected EOF while looking for matching `"' bash: -c: line 25: syntax error: unexpected end of file maheshreddy690 Linux - Newbie 1 12-25-2018 01:13 PM
PHP Parse error: syntax error, unexpected end of file in Command line code on line 1 pizzipie Programming 8 12-11-2014 12:49 PM
httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 iswarya Linux - Newbie 1 01-25-2012 01:28 PM
Error in Bash: line 77: syntax error: unexpected end of file bribon Programming 8 07-13-2011 12:43 PM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM

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

All times are GMT -5. The time now is 07:09 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
Open Source Consulting | Domain Registration