Search code examples
haskellcabalubuntu-14.04haskell-lensleksah

Failed to install lens-4.2 : Cabal 1.20.0.2, GHC 7.6.3, Ubuntu 14.04


I was installing leksah ( "cabal install leksah" ) & the it failed with a message similar to below one ( about lens 4.2 dependency )

I tried installing the lasted version instead but that didn't solved my problem . ( I have unregistered that - "ghc-pkg unregister lens" )

Note : I do -not- want to install leksah on a sandbox

$ cabal install lens-4.2

src/Control/Lens/Internal/Instances.hs:36:10:
    Duplicate instance declarations:
      instance Foldable ((,) b)
        -- Defined at src/Control/Lens/Internal/Instances.hs:36:10
      instance Foldable ((,) b)
        -- Defined in `Data.Traversable.Instances'

src/Control/Lens/Internal/Instances.hs:39:10:
    Duplicate instance declarations:
      instance Traversable ((,) b)
        -- Defined at src/Control/Lens/Internal/Instances.hs:39:10
      instance Traversable ((,) b)
        -- Defined in `Data.Traversable.Instances'

src/Control/Lens/Internal/Instances.hs:42:10:
    Duplicate instance declarations:
      instance Foldable (Either a)
        -- Defined at src/Control/Lens/Internal/Instances.hs:42:10
      instance Foldable (Either a)
        -- Defined in `Data.Traversable.Failed to install lens-4.2
s/Internal/Instances.hs:46:10:
    Duplicate instance declarations:
      instance Traversable (Either a)
        -- Defined at src/Control/Lens/Internal/Instances.hs:46:10
      instance Traversable (Either a)
        -- Defined in `Data.Traversable.Instances'

src/Control/Lens/Internal/Instances.hs:50:10:
    Duplicate instance declarations:
      instance Foldable (Const m)
        -- Defined at src/Control/Lens/Internal/Instances.hs:50:10
      instance Foldable (Const m)
        -- Defined in `Data.Traversable.Instances'

src/Control/Lens/Internal/Instances.hs:53:10:
    Duplicate instance declarations:
      instance Traversable (Const m)
        -- Defined at src/Control/Lens/Internal/Instances.hs:53:10
      instance Traversable (Const m)
        -- Defined in `Data.Traversable.Instances'

src/Control/Lens/Internal/Instances.hs:57:10:
    Duplicate instance declarations:
      instance Foldable1 ((,) b)
        -- Defined at src/Control/Lens/Internal/Instances.hs:57:10
      instance Foldable1 ((,) a) -- Defined in `Data.Semigroup.Foldable'

src/Control/Lens/Internal/Instances.hs:60:10:
    Duplicate instance declarations:
      instance Traversable1 ((,) b)
        -- Defined at src/Control/Lens/Internal/Instances.hs:60:10
      instance Traversable1 ((,) a)
        -- Defined in `Data.Semigroup.Traversable'
cabal: Error: some packages failed to install:
lens-4.2 failed during the building phase. The exception was:
ExitFailure 1

output of "ghc-pkg list"

$ ghc-pkg list

/var/lib/ghc/package.conf.d:
    Cabal-1.16.0
    GLURaw-1.3.0.0
    GLUT-2.4.0.0
    HTTP-4000.2.8
    HUnit-1.2.5.2
    MonadCatchIO-mtl-0.3.0.5
    OpenGL-2.8.0.0
    OpenGLRaw-1.3.0.0
    QuickCheck-2.6
    array-0.4.0.1
    async-2.0.1.4
    attoparsec-0.10.4.0
    base-4.6.0.1
    bin-package-db-0.0.0.0
    binary-0.5.1.1
    bytestring-0.10.0.2
    case-insensitive-1.1.0.2
    cgi-3001.1.8.3
    containers-0.5.0.0
    deepseq-1.3.0.1
    directory-1.2.0.1
    extensible-exceptions-0.1.1.4
    fgl-5.4.2.4
    filepath-1.3.0.1
    (ghc-7.6.3)
    ghc-prim-0.3.0.0
    hashable-1.2.1.0
    haskell-src-1.0.1.5
    (haskell2010-1.1.1.0)
    (haskell98-2.0.0.2)
    hoopl-3.9.0.0
    hpc-0.6.0.0
    html-1.0.1.2
    integer-gmp-0.5.0.0
    mtl-2.1.2
    network-2.4.1.2
    old-locale-1.0.0.5
    old-time-1.1.0.1
    parallel-3.2.0.3
    parsec-3.1.3
    pretty-1.1.1.0
    primitive-0.5.0.1
    process-1.1.0.2
    random-1.0.1.1
    regex-base-0.93.2
    regex-compat-0.95.1
    regex-posix-0.95.2
    rts-1.0
    split-0.2.2
    stm-2.4.2
    syb-0.4.0
    template-haskell-2.8.0.0
    text-0.11.3.1
    time-1.4.0.1
    transformers-0.3.0.0
    unix-2.6.0.1
    unordered-containers-0.2.3.0
    vector-0.10.0.1
    xhtml-3000.2.1
    zlib-0.5.4.1

/home/bandbaz/.ghc/x86_64-linux-7.6.3/package.conf.d:
    Cabal-1.20.0.2
    aeson-0.7.0.6
    attoparsec-0.11.3.4
    attoparsec-conduit-1.0.1.2
    bifunctors-4.1.1.1
    binary-shared-0.8.3
    blaze-builder-0.3.3.2
    blaze-html-0.7.0.2
    blaze-markup-0.6.1.0
    cairo-0.12.5.3
    cmdargs-0.10.9
    comonad-4.2.2
    conduit-1.0.17.1
    contravariant-0.6.1.1
    cpphs-1.18.5
    darcs-2.8.4
    dataenc-0.14.0.7
    distributive-0.4.4
    dlist-0.7.1
    exceptions-0.6.1
    executable-path-0.0.3
    free-4.9
    ghc-paths-0.1.0.9
    ghcjs-codemirror-0.0.0.1
    ghcjs-dom-0.0.10
    gio-0.12.5.3
    glib-0.12.5.4
    gtk3-0.12.5.7
    haddock-2.13.2.1
    hamlet-1.2.0
    hashed-storage-0.5.11
    haskeline-0.7.1.3
    haskell-lexer-1.0
    haskell-src-exts-1.14.0.1
    haskell-src-meta-0.6.0.5
    hlint-1.8.61
    hscolour-1.20.3
    hslogger-1.2.4
    hxt-9.3.1.4
    hxt-charproperties-9.1.1.1
    hxt-regex-xmlschema-9.1.0
    hxt-unicode-9.0.2.2
    jmacro-0.6.9
    leksah-server-0.13.1.1
    lifted-base-0.2.3.0
    ltk-0.13.2.0
    mmap-0.5.9
    mmorph-1.0.3
    monad-control-0.3.3.0
    nats-0.2
    pango-0.12.5.3
    parseargs-0.1.5.2
    polyparse-1.9
    prelude-extras-0.4
    pretty-show-1.6.8
    profunctors-4.2.0.1
    reflection-1.5.1
    regex-tdfa-1.2.0
    resourcet-0.4.10.2
    safe-0.3.7
    scientific-0.3.3.0
    semigroupoids-4.2
    semigroups-0.15.2
    shakespeare-2.0.1.1
    strict-0.3.2
    system-fileio-0.3.14
    system-filepath-0.4.12
    tagged-0.7.2
    tar-0.4.0.1
    terminfo-0.3.2.6
    text-stream-decode-0.1.0.5
    th-lift-0.6.1
    th-orphans-0.8.1
    transformers-base-0.4.2
    transformers-compat-0.3.3.4
    uniplate-1.6.12
    utf8-string-0.3.8
    vado-0.0.1
    vcsgui-0.0.4
    vcswrapper-0.0.4
    void-0.6.1
    webkitgtk3-0.12.6.1
    webkitgtk3-javascriptcore-0.12.5.1
    wl-pprint-text-1.1.0.2

Solution

  • Solved by updating cabal packages ( "cabal update" ) & then installing :-/