Unable to install Emacs 24 from ppa:cassou/emacs

410

Solution 1

I had the same error yesterday. I tried installing every emacs package in the repository, and when that didn't work, it occurred to me that maybe conflicts were the problem. Since I didn't need emacs23 if emacs-snapshot would work, I did the following:

Uninstall All Emacs Packages

Before proceeding, have a look at what emacs packages might be installed by issuing `sudo apt-cache search emacs'. If you can sacrifice everything in the output, go ahead with the following suggestion.

sudo apt-get remove `apt-cache search emacs | awk '{print $1}'` --purge

If something else shows up in the output that you wish to keep, a quick way to get rid of the things you don't want is to redirect the output of the command to a file, edit that file, and then use the contents of that file for arguments to apt-get remove.

  1. sudo apt-cache search emacs > remove.txt
  2. Edit remove.txt by deleting the lines of packages you wish to keep. The goal here is to get rid of anything emacs-related, so leave those packages in the file.
  3. sudo cat remove.txt | xargs apt-get remove --purge

You may get some errors here since emacs-snapshot failed to install correctly. If you do, try uninstalling those packages manually by first force installing the broken packages and then remove-purging them.

sudo apt-get -f install # don't list packages here
sudo apt-get remove emacs-snapshot --purge

It's probably also a good idea to autoclean and autoremove.

sudo apt-get autoclean
sudo apt-get autoremove

Install Emacs 24

sudo apt-get install emacs-snapshot

This assumes that you have the PPA added correctly (I'm using the cassou PPA as well). Everything seems to work nicely now!

Try aptitude

Since originally writing this answer I've moved on the using aptitude to manage my packages on the command line. I don't like the graphical interface (ncurses) you get from issuing sudo aptitude, so I only use it when I need to resolve dependencies/conflicts leftover from experimenting with different desktop environments. Most of the time, I simply use it as a drop-in replacement for apt-get, as in sudo aptitude install [package].

Related: Is aptitude still considered superior to apt-get?

Solution 2

I have Emacs installed from this PPA and I checked the dependencies. Ubuntu 11.10 works with this PPA out of the box so you shouldn't have any issues. Here is the list of dependencies for the emacs-snapshot:

emacs-snapshot-bin-common (= 1:20111227-1~ppa1~oneiric1)libasound2 (>> 1.0.24.1), libc6 (>= 2.11), libcairo2 (>= 1.2.4), libdbus-1-3 (>= 1.1.1), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libgif4 (>= 4.1.4), libglib2.0-0 (>= 2.26.0), libgnutls26 (>= 2.9.11-0), libgpm2 (>= 1.20.4), libgtk-3-0 (>= 3.0.0), libice6 (>= 1:1.0.0), libjpeg62 (>= 6b1), libm17n-0 (>= 1.6.1), libmagickcore3 (>= 8:6.6.0.4), libmagickwand3 (>= 8:6.6.0.4), libncurses5 (>= 5.5-5~), libotf0 (>= 0.9.11), libpng12-0 (>= 1.2.13-4), librsvg2-2 (>= 2.14.4), libselinux1 (>= 1.32), libsm6, libtiff4, libtinfo5 (>= 5.6+20070908), libx11-6, libxft2 (>> 2.1.1), libxml2 (>= 2.7.4), libxpm4, libxrender1

Something is a muck in your dependencies. I would disable the PPA, do an apt-get update and upgrade then apt-get clean then re-enable the PPA again and try it.

Solution 3

Just for information, on Precise Pangolin 12.04 it can be simply done with

sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot

and it works out-of-the-box.

Share:
410

Related videos on Youtube

Paavo Koppelo
Author by

Paavo Koppelo

Updated on September 18, 2022

Comments

  • Paavo Koppelo
    Paavo Koppelo almost 2 years

    I need to create a (WP7) chart containing multiple series. The data I'm trying to visualize:

    F.ex following collection, containing UserName, Date, Points:

    1. User1,2011-11-09,6
    2. User2,2011-11-09,8
    3. User1,2011-11-02,9
    4. User2,2011-11-02,8

    There can be more than two users in the data.

    XAML Namespace

    xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    

    CodeBehind

    mdChart.Series.Add(MDSeries);                
    mdChart.Title = "Statistics";
    MDSeries.SetBinding(ColumnSeries.ItemsSourceProperty, new Binding());
    MDSeries.ItemsSource = lCompetitionStats;
    MDSeries.DependentValuePath = "Points";
    series.IndependentValuePath = "Date";
    MDSeries.IndependentValuePath = "UserName";
    

    XAML

    <controls:PanoramaItem Header="mdscores">
        <Grid>
            <charting:Chart x:Name="mdChart" Foreground="Blue" Background="Black">
                <charting:ColumnSeries Background="Black"/>
            </charting:Chart>
        </Grid>
    </controls:PanoramaItem>
    

    As a result, i have the users on X-axis and Points on the Y-axis. I would need dates on X-axis, Points on Y-Axis and a separate serie for earch user. How to create/populate such a chart runtime?

    • jrg
      jrg over 12 years
      Try sudo apt-get install -f?
    • Garland Briggs
      Garland Briggs over 12 years
      No luck. After running sudo apt-get install -f and then sudo apt-get autoremove, I still get the same error.
    • GeneralBecos
      GeneralBecos about 12 years
      I'm facing this exact same problem.
    • GeneralBecos
      GeneralBecos about 12 years
      I just tried again after an update and it now worked!
  • sayth
    sayth about 12 years
    wouldn't do this on 12.04 sudo apt-get remove apt-cache search emacs | awk '{print $1}' --purge I started to do it but it wanted to remove half of ubuntu banshee unity geany and whole other 291mb of ubuntu.
  • jrhorn424
    jrhorn424 about 12 years
    I agree it isn't desirable to do that blind. I've edited my answer to suggest checking the output of apt-cache search emacs before proceeding. For me, this was the only solution that fixed the problem. I don't recall having to reinstall anything, but if you make an error, it should be easy to correct with the package manager.
  • jrhorn424
    jrhorn424 almost 12 years
    By "out-of-the-box", do you mean on a fresh install? Is emacs already present when you installed emacs-snapshot?
  • leonard vertighel
    leonard vertighel almost 12 years
    Sorry, I mean: once I have given those commands, it works without any other intervention.
  • Eric Carvalho
    Eric Carvalho almost 11 years
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
  • legend
    legend over 7 years
    @jrhorn424 unable to execute this command "sudo apt-get remove apt-cache search emacs | awk '{print $1}' --purge".