<p>Try to run <code>nix-shell</code> from within the plutus-apps folder and then (inside this nix shell) navigate to the plutus-pioneer folder to run the cabal command.</p>

CC BY-SA 4.0
2022-03-14T20:54:14.373Z
2022-03-14T20:54:14.373Z
Jey
<p>I'm trying to build the plutus-pioneer program, and I assume that having the environment working is important also in order to build real smart-contracts;</p>
<p>I've set up nix and cache and I'm also sure to be working with the correct commit; I'm trying to build from inside the nix-shell launcehd from the plutus directory (which is assumed to resolve dependecies) but still I get the following error:</p>
<pre><code>cabal build --minimize-conflict-set

Warning: Requested index-state 2021-10-20T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-10-19T23:39:06Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: lobemo-scribe-systemd-0.1.0.0 (user goal)
[__1] next goal: libsystemd-journal (dependency of lobemo-scribe-systemd)
[__1] rejecting: libsystemd-journal-1.4.5, libsystemd-journal-1.4.4,
libsystemd-journal-1.4.3, libsystemd-journal-1.4.2, libsystemd-journal-1.4.1,
libsystemd-journal-1.4.0, libsystemd-journal-1.3.4, libsystemd-journal-1.3.3,
libsystemd-journal-1.3.1, libsystemd-journal-1.3.0 (conflict: pkg-config
package libsystemd&gt;=209, not found in the pkg-config database)
[__1] trying: libsystemd-journal-1.2.0
[__2] next goal: base (dependency of lobemo-scribe-systemd)
[__2] rejecting: base-4.14.1.0/installed-4.14.1.0 (conflict:
libsystemd-journal =&gt; base&gt;=4.6 &amp;&amp; &lt;4.8)
[__2] skipping: base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0,
base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '&gt;=4.6 &amp;&amp; &lt;4.8' from
'libsystemd-journal')
[__2] rejecting: base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: base, libsystemd-journal,
lobemo-scribe-systemd)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, libsystemd-journal,
lobemo-scribe-systemd

</code></pre>
<p>could anyone please explain to me what am I doing wrong?</p>
<h3>additional infos</h3>
<p>evrything executed in nix-shell environment</p>
<h4>ghc version</h4>
<pre><code>ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.4.20210212
</code></pre>
<h4>cabal varsion</h4>
<pre><code>cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library 
</code></pre>

CC BY-SA 4.0
2022-03-14T16:00:26.067Z
Did you do "cabal update" before "cabal build" ?
kindofdev
CC BY-SA 4.0
2022-03-14T16:20:34.017Z
I could only build inside a nix shell. Install nix and then instead of your command type nix-shell. It should build the thing and open the shell. From within that, you can then execute your cabal-commands.
Jey
CC BY-SA 4.0
2022-03-14T16:32:08.293Z
@kindofdev yes I did ```cabal update```, I retryied justy in case and the error persists;
Michele Nuzzi
CC BY-SA 4.0
2022-03-14T16:32:52.387Z
@Jey I'm already in a nix-shell environment
Michele Nuzzi
CC BY-SA 4.0
2022-03-14T16:35:32.987Z
Ok. Did you execute "nix-shell" from within the folder of plutus-apps ?
Jey
CC BY-SA 4.0
2022-03-14T16:48:45.283Z
Did you do `cabal build` on ppp/code/week0x folder ?
kindofdev
CC BY-SA 4.0
2022-03-14T17:17:24.950Z
@Jey no I launched ```nix-shell``` form the ```plutus``` repository, I'm trying from ```plutus-apps``` now
Michele Nuzzi
CC BY-SA 4.0
2022-03-14T17:18:57.620Z
@kindofdev yes I tryied ```cabal build``` on ```plutus```, ```plutus-apps``` and the ```week0x``` folders (with aprropriate tags setted before launching the ```nix-shell``` from the ```plutus``` repo
Michele Nuzzi
CC BY-SA 4.0
2022-03-14T17:34:24.447Z
You need to launch nix-shell from plutus-apps, not plutus
kindofdev
CC BY-SA 4.0
2022-03-14T19:26:41.570Z
@Jey @kindofdev launching ```nix-shell``` from ```plutus-apps``` solved the issue; if any of you want to answer the question I'll mark it as soilved, thank you
Michele Nuzzi
<plutus><plutus-pioneer-program>
could not build or repl plutus-pioneer-program
# could not build or repl plutus-pioneer-program

(Asked by: username_0 on 2022-03-14)

I'm trying to build the plutus-pioneer program, and I assume that having the environment working is important also in order to build real smart-contracts;
I've set up nix and cache and I'm also sure to be working with the correct commit; I'm trying to build from inside the nix-shell launcehd from the plutus directory (which is assumed to resolve dependecies) but still I get the following error:
cabal build --minimize-conflict-set

Warning: Requested index-state 2021-10-20T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-10-19T23:39:06Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: lobemo-scribe-systemd-0.1.0.0 (user goal)
[__1] next goal: libsystemd-journal (dependency of lobemo-scribe-systemd)
[__1] rejecting: libsystemd-journal-1.4.5, libsystemd-journal-1.4.4,
libsystemd-journal-1.4.3, libsystemd-journal-1.4.2, libsystemd-journal-1.4.1,
libsystemd-journal-1.4.0, libsystemd-journal-1.3.4, libsystemd-journal-1.3.3,
libsystemd-journal-1.3.1, libsystemd-journal-1.3.0 (conflict: pkg-config
package libsystemd>=209, not found in the pkg-config database)
[__1] trying: libsystemd-journal-1.2.0
[__2] next goal: base (dependency of lobemo-scribe-systemd)
[__2] rejecting: base-4.14.1.0/installed-4.14.1.0 (conflict:
libsystemd-journal => base>=4.6 && <4.8)
[__2] skipping: base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0,
base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=4.6 && <4.8' from
'libsystemd-journal')
[__2] rejecting: base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: base, libsystemd-journal,
lobemo-scribe-systemd)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, libsystemd-journal,
lobemo-scribe-systemd


could anyone please explain to me what am I doing wrong?
additional infos
evrything executed in nix-shell environment
ghc version
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.4.20210212

cabal varsion
cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library

**Tags:** plutus, plutus-pioneer-program
> **Comments:**
> **username_1**: Did you do "cabal update" before "cabal build" ?  
> **username_2**: I could only build inside a nix shell. Install nix and then instead of your command type nix-shell. It should build the thing and open the shell. From within that, you can then execute your cabal-commands.  
> **username_0**: @kindofdev yes I did ```cabal update```, I retryied justy in case and the error persists;  
> **username_0**: @Jey I'm already in a nix-shell environment  
> **username_2**: Ok. Did you execute "nix-shell" from within the folder of plutus-apps ?  
> **username_1**: Did you do `cabal build` on ppp/code/week0x folder ?  
> **username_0**: @Jey no I launched ```nix-shell``` form the ```plutus``` repository, I'm trying from ```plutus-apps``` now  
> **username_0**: @kindofdev yes I tryied ```cabal build``` on ```plutus```, ```plutus-apps``` and the ```week0x``` folders (with aprropriate tags setted before launching the ```nix-shell``` from the ```plutus``` repo  
> **username_1**: You need to launch nix-shell from plutus-apps, not plutus  
> **username_0**: @Jey @kindofdev launching ```nix-shell``` from ```plutus-apps``` solved the issue; if any of you want to answer the question I'll mark it as soilved, thank you  

---

## 1 answers

### Answer by username_2 on 2022-03-14. Score: 1 | Accepted answer

Try to run `nix-shell` from within the plutus-apps folder and then (inside this nix shell) navigate to the plutus-pioneer folder to run the cabal command.


---

