Score:0

No input and output sound device. Can't Install Pulseaudio after deletion

cn flag

I recently fixed my broken packages by deleting pulseaudio, since I cannot install any other packages that I needed for my research (I am using 20.04 btw). Deleting pulseaudio seems to solve my problem. I am now able to install other packages. It turns out that, after removing pulseaudio, I do not have any input and output to my sound device.

enter image description here

I even download the pulseaudio_13.99.1-1ubuntu3_amd64.deb and install it but failed due to this repeated error:

unable to make backup link of './usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common' before installing new version: Operation not permitted

enter image description here

I have tried many methods all across the internet but failed. Any help will be appreciated.

Edit [12-29-21]

As I said above. I already deleted the pulseaudio and when trying to install it again, this is the error that always shows up:

This is the output when I try apt-cache policy pulseaudio:

enter image description here

Edit [12-30-21 | 1:12am]

After running snap as suggested by @nobody, I found the pulseaudio here:

Name                    Version                     Rev    Tracking         Publisher               Notes
bare                    1.0                         5      latest/stable    canonical✓              base
canonical-livepatch     10.1.2                      126    latest/stable    canonical✓              -
core                    16-2.52.1                   11993  latest/stable    canonical✓              core
core18                  20211028                    2253   latest/stable    canonical✓              base
core20                  20211129                    1270   latest/stable    canonical✓              base
evince                  41.3                        1008   latest/stable    ken-vandine             -
figma-linux             0.9.3                       149    latest/stable    youdonthavepermissiony  -
gnome-3-28-1804         3.28.0-19-g98f9e67.98f9e67  161    latest/stable    canonical✓              -
gnome-3-34-1804         0+git.3556cb3               77     latest/stable/…  canonical✓              -
gnome-3-38-2004         0+git.cd626d1               87     latest/stable    canonical✓              -
gtk-common-themes       0.1-59-g7bca6ae             1519   latest/stable/…  canonical✓              -
heroku                  v7.59.1                     4078   latest/stable    heroku✓                 classic
jupyter                 1.0.0                       6      latest/stable    projectjupyter✓         -
pdftk                   2.02-4                      9      latest/stable    smoser                  -
postman                 7.36.5                      133    latest/stable    postman-inc✓            -
pulseaudio              8.0-3                       9      latest/stable    canonical✓              -
simplescreenrecorder    0.1                         1      latest/stable    xiaoguo                 -
snap-store              3.38.0-66-gbd5b8f7          558    latest/stable/…  canonical✓              -
snapd                   2.53.4                      14295  latest/stable    canonical✓              snapd
telegram-desktop        3.3.1-beta-4-gffe420859     3492   latest/edge      telegram.desktop        -
utorrent                3.5.5.45828                 97     latest/stable    mmtrt                   -
wine-platform-3-stable  3.0.4                       14     latest/stable    mmtrt                   -
wine-platform-runtime   v1.0                        277    latest/stable    mmtrt                   -
zoom-client             5.9.1.1380                  167    latest/stable    ogra                    -

When i try sudo apt-get install pulseaudio this is the output looks like:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  pavumeter paman paprefs ubuntu-sounds
The following NEW packages will be installed:
  pulseaudio
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/814 kB of archives.
After this operation, 4,645 kB of additional disk space will be used.
Selecting previously unselected package pulseaudio.
(Reading database ... 540571 files and directories currently installed.)
Preparing to unpack .../pulseaudio_1%3a13.99.1-1ubuntu3.13_amd64.deb ...
Unpacking pulseaudio (1:13.99.1-1ubuntu3.13) ...
dpkg: error processing archive /var/cache/apt/archives/pulseaudio_1%3a13.99.1-1ubuntu3.13_amd64.deb (--unpack):
 unable to make backup link of './usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common' before installing new version: Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/pulseaudio_1%3a13.99.1-1ubuntu3.13_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think the pulseaudio installed via snap is not appearing or have some problem causing error to new installation. I'm not sure.

When I try sed -i s,//ph.archive,//archive,g /etc/apt/sources.list and sudo apt update as suggested by @nobody, this is the output looks like:

reymond@RMesuga:~$ sed -i s,//ph.archive,//archive,g  /etc/apt/sources.list
sed: couldn't open temporary file /etc/apt/sedeUQrNF: Permission denied
reymond@RMesuga:~$ sudo sed -i s,//ph.archive,//archive,g  /etc/apt/sources.list
[sudo] password for reymond: 
reymond@RMesuga:~$ sudo apt update
Ign:1 cdrom://Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731) focal InRelease
Err:2 cdrom://Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731) focal Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://packages.microsoft.com/repos/edge stable InRelease                
Hit:5 http://packages.microsoft.com/repos/code stable InRelease                
Hit:6 https://packages.microsoft.com/repos/vscode stable InRelease             
Get:7 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]                
Hit:8 https://packages.microsoft.com/repos/ms-teams stable InRelease           
Hit:9 http://security.ubuntu.com/ubuntu focal-security InRelease               
Hit:10 http://ppa.launchpad.net/apandada1/droidcam/ubuntu focal InRelease      
Hit:11 http://archive.canonical.com/ubuntu focal InRelease                     
Hit:12 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease            
Hit:13 https://download.sublimetext.com apt/stable/ InRelease                  
Ign:14 http://ppa.launchpad.net/noobslab/icons2/ubuntu focal InRelease         
Get:15 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] 
Get:16 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]     
Ign:17 http://ppa.launchpad.net/octave/stable/ubuntu focal InRelease
Get:18 http://archive.ubuntu.com/ubuntu focal/main Sources [847 kB]      
Ign:19 http://ppa.launchpad.net/paolorotolo/droidcam/ubuntu focal InRelease   
Get:20 http://archive.ubuntu.com/ubuntu focal/restricted Sources [6,472 B]    
Get:21 http://archive.ubuntu.com/ubuntu focal/universe Sources [9,707 kB]
Hit:22 http://ppa.launchpad.net/scribus/ppa/ubuntu focal InRelease             
Ign:23 http://ppa.launchpad.net/snwh/pulp/ubuntu focal InRelease               
Err:24 http://ppa.launchpad.net/noobslab/icons2/ubuntu focal Release
  404  Not Found [IP: 91.189.95.85 80]
Err:25 http://ppa.launchpad.net/octave/stable/ubuntu focal Release             
  404  Not Found [IP: 91.189.95.85 80]
Get:26 http://archive.ubuntu.com/ubuntu focal/multiverse Sources [174 kB]      
Get:27 http://archive.ubuntu.com/ubuntu focal/main i386 Packages [718 kB]      
Err:28 http://ppa.launchpad.net/paolorotolo/droidcam/ubuntu focal Release      
  404  Not Found [IP: 91.189.95.85 80]
Get:29 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [970 kB]     
Get:30 http://archive.ubuntu.com/ubuntu focal/main Translation-en [506 kB]     
Err:31 http://ppa.launchpad.net/snwh/pulp/ubuntu focal Release                 
  404  Not Found [IP: 91.189.95.85 80]
Get:32 http://archive.ubuntu.com/ubuntu focal/main amd64 DEP-11 Metadata [494 kB]
Get:33 http://archive.ubuntu.com/ubuntu focal/main DEP-11 48x48 Icons [98.4 kB]
Get:34 http://archive.ubuntu.com/ubuntu focal/main DEP-11 64x64 Icons [163 kB] 
Get:35 http://archive.ubuntu.com/ubuntu focal/main DEP-11 64x64@2 Icons [15.8 kB]
Get:36 http://archive.ubuntu.com/ubuntu focal/main amd64 c-n-f Metadata [29.5 kB]
Get:37 http://archive.ubuntu.com/ubuntu focal/restricted i386 Packages [8,112 B]
Get:38 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [22.0 kB]
Get:39 http://archive.ubuntu.com/ubuntu focal/restricted Translation-en [6,212 B]
Get:40 http://archive.ubuntu.com/ubuntu focal/restricted amd64 c-n-f Metadata [392 B]
Get:41 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages [4,642 kB]
Get:42 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8,628 kB]
Get:43 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5,124 kB]
Get:44 http://archive.ubuntu.com/ubuntu focal/universe amd64 DEP-11 Metadata [3,603 kB]
Get:45 http://archive.ubuntu.com/ubuntu focal/universe DEP-11 48x48 Icons [3,016 kB]
Get:47 http://archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64 Icons [7,794 kB]
Get:49 http://archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64@2 Icons [44.3 kB]
Get:50 http://archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
Get:51 http://archive.ubuntu.com/ubuntu focal/multiverse i386 Packages [74.7 kB]
Get:52 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
Get:53 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
Get:54 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 DEP-11 Metadata [48.4 kB]
Get:55 http://archive.ubuntu.com/ubuntu focal/multiverse DEP-11 48x48 Icons [23.1 kB]
Get:56 http://archive.ubuntu.com/ubuntu focal/multiverse DEP-11 64x64 Icons [192 kB]
Get:57 http://archive.ubuntu.com/ubuntu focal/multiverse DEP-11 64x64@2 Icons [214 B]
Get:58 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9,136 B]
Get:59 http://archive.ubuntu.com/ubuntu focal-updates/restricted Sources [29.0 kB]
Get:60 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Sources [19.0 kB]
Get:61 http://archive.ubuntu.com/ubuntu focal-updates/universe Sources [213 kB]
Get:62 http://archive.ubuntu.com/ubuntu focal-updates/main Sources [454 kB]    
Get:63 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [574 kB]
Get:64 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,400 kB]
Hit:46 https://packagecloud.io/github/git-lfs/ubuntu focal InRelease           
Get:65 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [283 kB]
Get:66 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [277 kB]
Get:67 http://archive.ubuntu.com/ubuntu focal-updates/main DEP-11 48x48 Icons [60.8 kB]
Get:68 http://archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64 Icons [98.3 kB]
Get:69 http://archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64@2 Icons [29 B]
Get:70 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
Get:71 http://archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [21.8 kB]
Get:72 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [616 kB]
Get:73 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [88.1 kB]
Get:74 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [528 B]
Get:75 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [884 kB]
Get:76 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [654 kB]
Get:77 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [193 kB]
Get:78 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [363 kB]
Get:79 http://archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 48x48 Icons [219 kB]
Hit:48 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease 
Get:80 http://archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64 Icons [393 kB]
Get:81 http://archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64@2 Icons [29 B]
Get:82 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [19.9 kB]
Get:83 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [24.8 kB]
Get:84 http://archive.ubuntu.com/ubuntu focal-updates/multiverse i386 Packages [8,456 B]
Get:85 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [6,928 B]
Get:86 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:87 http://archive.ubuntu.com/ubuntu focal-updates/multiverse DEP-11 48x48 Icons [1,865 B]
Get:88 http://archive.ubuntu.com/ubuntu focal-updates/multiverse DEP-11 64x64 Icons [2,498 B]
Get:89 http://archive.ubuntu.com/ubuntu focal-updates/multiverse DEP-11 64x64@2 Icons [29 B]
Get:90 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [616 B]
Get:91 http://archive.ubuntu.com/ubuntu focal-backports/main Sources [6,584 B] 
Get:92 http://archive.ubuntu.com/ubuntu focal-backports/universe Sources [4,624 B]
Get:93 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [42.0 kB]
Get:94 http://archive.ubuntu.com/ubuntu focal-backports/main i386 Packages [34.5 kB]
Get:95 http://archive.ubuntu.com/ubuntu focal-backports/main Translation-en [10.0 kB]
Get:96 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,992 B]
Get:97 http://archive.ubuntu.com/ubuntu focal-backports/main DEP-11 48x48 Icons [6,977 B]
Get:98 http://archive.ubuntu.com/ubuntu focal-backports/main DEP-11 64x64 Icons [10.5 kB]
Get:99 http://archive.ubuntu.com/ubuntu focal-backports/main DEP-11 64x64@2 Icons [29 B]
Get:100 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [864 B]
Get:101 http://archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:102 http://archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [10.5 kB]
Get:103 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [18.9 kB]
Get:104 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [7,492 B]
Get:105 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [11.3 kB]
Get:106 http://archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 48x48 Icons [4,959 B]
Get:107 http://archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64 Icons [8,416 B]
Get:108 http://archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64@2 Icons [29 B]
Get:109 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [636 B]
Get:110 http://archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
Reading package lists... Done                                                  
E: The repository 'cdrom://Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731) focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Skipping acquire of configured file 'main/source/Sources' as repository 'https://packages.microsoft.com/repos/vscode stable InRelease' does not seem to provide it (sources.list entry misspelt?)
W: Skipping acquire of configured file 'Sources' as repository 'https://download.sublimetext.com apt/stable/ InRelease' does not seem to provide it (sources.list entry misspelt?)
E: The repository 'http://ppa.launchpad.net/noobslab/icons2/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/octave/stable/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/paolorotolo/droidcam/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/snwh/pulp/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

<strong>Edit [12-30-21 | 4:10 am]</strong><br>
All problems are SOLVED!!! Thanks to @nobody. To people who might be facing the same issue in the future, please check the accepted answer followed by the comments. The additional comments that she put there is is crucial part of the solution. Thanks again people especially to @nobody !!!
nobody avatar
gh flag
`apt-cache policy pulseaudio` please [edit] your question for showing us. Also `sudo apt update`
M_Rey avatar
cn flag
@nobody pls see the adit on my answer
nobody avatar
gh flag
. `sudo dpkg -P pulseaudio` and `dpkg -l | egrep -v '^ii|rc'` please.
M_Rey avatar
cn flag
@nobody, the first command fails because pulseaudio is removed already. The second command shows something like `Desired=Unknown/Install/Remove/Purge/Hold`
nobody avatar
gh flag
Never saw this error before. `snap list` we change to mainserver `sed -i s,//ph.archive,//archive,g /etc/apt/sources.list` Then show please also `sudo apt update` as text not as picture please. After that I'm more or less out of ideas.
M_Rey avatar
cn flag
@nobody please see the edit. Thank you
Score:1
gh flag

ohwei,

sudo cp /etc/apt/sources.list /etc/apt/sources.list.save

first we copy the sources.list.

sudo nano /etc/apt/sources.list

search for the line with cdrom in name and delete this line

My error I forgot sudo

sudo sed -i s,//ph.archive,//archive,g /etc/apt/sources.list

then mv any file under /etc/apt/sources.list.d/ to a folder in your $HOME

mkdir $HOME/ppa-backup

then mv

sudo mv /etc/apt/sources.list.d/* $HOME/ppa-backup/

Now we get rid of this pulseaudio snap

sudo snap remove pulseaudio 
    sudo apt-get clean

This clears the cache in /var/cache/apt/archives/ Now we let apt forget what packages are available

sudo rm -rf /var/lib/apt/lists/*

With

sudo apt update

recreate this erased files with new informations.

sudo apt full-upgrade

Then install finally pulseaudio

sudo apt install pulseaudio

Edit as of 12-30-21
All of the above commands are working except to the last which installs the pulseaudio. I then tried this command as suggested by @nobody

sudo mv /usr/share/pulseaudio /usr/share/pulseaudio.bak

followed again by

sudo apt install pulseaudio

If there is no error anymore then reboot your computer immediately. Please check the comment section as Ms. @nobody found the solution to the problem. All thanks to her!

M_Rey avatar
cn flag
Hi @nobody, all the commands are working fine except for the last which shows the same error. Thank you for the effort, though. Very appreciated!
M_Rey avatar
cn flag
Not sure but I think the root of the problem is this file `unable to make backup link of './usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common' before installing new version: Operation not permitted`
nobody avatar
gh flag
`ls -al /usr/share/ | grep pulse`
M_Rey avatar
cn flag
This is the output `drwxr-xr-x 3 root root 4096 Aug 1 2020 pulseaudio`
nobody avatar
gh flag
`sudo mv /usr/share/pulseaudio /usr/share/pulseaudio.bak` and try again please.
M_Rey avatar
cn flag
slr. I just tried this command and immediately tried the `sudo apt install pulseaudio`. There seems to be no error but I will restart my computer and I will be back here real quick. Thanks, bro.
nobody avatar
gh flag
great, but I'm a sis :D
M_Rey avatar
cn flag
I think the problem that i encountered here is so unique. It took me almost a month trying out different answers here at askubuntu. Thank you so much again, @nobody !!!
Score:0
mx flag

Run the following commands to get the latest package information and install pulseaudio:

sudo apt-get update (This will get updates)

sudo apt-get autoclean && sudo apt-get autoremove (This will remove obsolete packages)

sudo apt-get --fix-broken install (To fix broken packages)

sudo apt-get upgrade (This strictly upgrades the current packages)

sudo apt-get install pulseaudio

M_Rey avatar
cn flag
I already did this but i keep getting the same error like here https://i.stack.imgur.com/yADAx.png
stumblebee avatar
mx flag
I updated my answer to remove obsolete and fix broken packages.
M_Rey avatar
cn flag
Thank you for the effort and time @stumblebee. But i'm still getting the same error related to this `unable to make backup link of './usr/share/pulseaudio/alsa-mixer/paths/ analog-output.conf.common' before installing new version: Operation not permitted`. My last option is to reinstall my ubuntu all over again via live usb.
stumblebee avatar
mx flag
Your welcome! While sometimes a reinstall may be the best option, I recommend you to wait for a bit for someone else more experienced than me to answer this question. We are all here to help one another and learn!
stumblebee avatar
mx flag
Do you have any other package manager software open such as "software" or "synaptic" open while performing this operation on the command line?
M_Rey avatar
cn flag
There is no other package manager running while performing these commands. Though, I used ubuntu software to remove the `pulseaudio_1%3a13.99.1-1ubuntu3.13_amd64.deb` because it's not accessible via terminal but that's before the sound options disappeare.
AjayC avatar
gb flag
I would suggest you to open a tty terminal (ctrl+shift+f2) and issue all those above commands. I hope this will fix it.
M_Rey avatar
cn flag
@stumblebee and @AjayC, all problems are solved now by the accepted answer above. Thanks to `nobody`. I very much appreciate all your help guys!!! Thank you so much!!!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.