Advertisement
Guest User

nix multiuser install fails

a guest
Jan 22nd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.33 KB | None | 0 0
  1. I'm trying to set-up (multi-user) following these instructions:
  2.  
  3. https://nixos.org/nix/manual/#sect-multi-user-installation
  4.  
  5. ```
  6. sh <(curl https://nixos.org/nix/install) --daemon
  7.  
  8. Welcome to the Multi-User Nix Installation
  9.  
  10. This installation tool will set up your computer with the Nix package
  11. manager. This will happen in a few stages:
  12.  
  13. 1. Make sure your computer doesn't already have Nix. If it does, I
  14. will show you instructions on how to clean up your old one.
  15.  
  16. 2. Show you what we are going to install and where. Then we will ask
  17. if you are ready to continue.
  18.  
  19. 3. Create the system users and groups that the Nix daemon uses to run
  20. builds.
  21.  
  22. 4. Perform the basic installation of the Nix files daemon.
  23.  
  24. 5. Configure your shell to import special Nix Profile files, so you
  25. can use Nix.
  26.  
  27. 6. Start the Nix daemon.
  28.  
  29. Would you like to see a more detailed list of what we will do?
  30. [y/n] y
  31.  
  32.  
  33. We will:
  34.  
  35. - make sure your computer doesn't already have Nix files
  36. (if it does, I will tell you how to clean them up.)
  37. - create local users (see the list above for the users we'll make)
  38. - create a local group (nixbld)
  39. - install Nix in to /nix
  40. - create a configuration file in /etc/nix
  41. - set up the "default profile" by creating some Nix-related files in
  42. /root
  43. - back up /etc/profile.d/nix.sh to /etc/profile.d/nix.sh.backup-before-nix
  44. - update /etc/profile.d/nix.sh to include some Nix configuration
  45. - load and start a service (at /etc/systemd/system/nix-daemon.service
  46. and /etc/systemd/system/nix-daemon.socket) for nix-daemon
  47.  
  48. Ready to continue?
  49. [y/n] y
  50.  
  51.  
  52. ---- let's talk about sudo -----------------------------------------------------
  53. This script is going to call sudo a lot. Every time we do, it'll
  54. output exactly what it'll do, and why.
  55.  
  56. Just like this:
  57.  
  58. ---- sudo execution ------------------------------------------------------------
  59. I am executing:
  60.  
  61. $ sudo echo
  62.  
  63. to demonstrate how our sudo prompts look
  64.  
  65.  
  66. This might look scary, but everything can be undone by running just a
  67. few commands. We used to ask you to confirm each time sudo ran, but it
  68. was too many times. Instead, I'll just ask you this one time:
  69.  
  70. Can we use sudo?
  71. [y/n] y
  72.  
  73. Yay! Thanks! Let's get going!
  74. grep: /etc/profile.d/nix.sh: Permission denied
  75.  
  76. ---- sudo execution ------------------------------------------------------------
  77. I am executing:
  78.  
  79. $ sudo test -e /root/.nix-defexpr
  80.  
  81. making sure that /root/.nix-defexpr doesn't exist
  82.  
  83. [sudo] password for user:
  84.  
  85. ---- sudo execution ------------------------------------------------------------
  86. I am executing:
  87.  
  88. $ sudo test -e /root/.nix-channels
  89.  
  90. making sure that /root/.nix-channels doesn't exist
  91.  
  92.  
  93. ---- sudo execution ------------------------------------------------------------
  94. I am executing:
  95.  
  96. $ sudo test -e /root/.nix-profile
  97.  
  98. making sure that /root/.nix-profile doesn't exist
  99.  
  100.  
  101. ---- Nix config report ---------------------------------------------------------
  102. Temp Dir: /tmp/tmp.I1SJL2Eia3
  103. Nix Root: /nix
  104. Build Users: 32
  105. Build Group ID: 30000
  106. Build Group Name: nixbld
  107.  
  108. build users:
  109. Username: UID
  110. nixbld1: 30001
  111. nixbld2: 30002
  112. nixbld3: 30003
  113. nixbld4: 30004
  114. nixbld5: 30005
  115. nixbld6: 30006
  116. nixbld7: 30007
  117. nixbld8: 30008
  118. nixbld9: 30009
  119. nixbld10: 30010
  120. nixbld11: 30011
  121. nixbld12: 30012
  122. nixbld13: 30013
  123. nixbld14: 30014
  124. nixbld15: 30015
  125. nixbld16: 30016
  126. nixbld17: 30017
  127. nixbld18: 30018
  128. nixbld19: 30019
  129. nixbld20: 30020
  130. nixbld21: 30021
  131. nixbld22: 30022
  132. nixbld23: 30023
  133. nixbld24: 30024
  134. nixbld25: 30025
  135. nixbld26: 30026
  136. nixbld27: 30027
  137. nixbld28: 30028
  138. nixbld29: 30029
  139. nixbld30: 30030
  140. nixbld31: 30031
  141. nixbld32: 30032
  142.  
  143. Ready to continue?
  144. [y/n] y
  145.  
  146.  
  147. ~~> Setting up the build group nixbld
  148. Exists: Yes
  149.  
  150. ~~> Setting up the build user nixbld1
  151. Exists: Yes
  152. Hidden: Yes
  153. Home Directory: /var/empty
  154.  
  155. ---- sudo execution ------------------------------------------------------------
  156. I am executing:
  157.  
  158. $ sudo usermod --comment Nix build user 1 nixbld1
  159.  
  160. in order to give nixbld1 a useful comment
  161.  
  162. usermod: no changes
  163. Note: Nix build user 1
  164. Logins Disabled: Yes
  165. Member of nixbld: Yes
  166. PrimaryGroupID: 30000
  167.  
  168. ~~> Setting up the build user nixbld2
  169. Exists: Yes
  170. Hidden: Yes
  171. Home Directory: /var/empty
  172.  
  173. ---- sudo execution ------------------------------------------------------------
  174. I am executing:
  175.  
  176. $ sudo usermod --comment Nix build user 2 nixbld2
  177.  
  178. in order to give nixbld2 a useful comment
  179.  
  180. usermod: no changes
  181. Note: Nix build user 2
  182. Logins Disabled: Yes
  183. Member of nixbld: Yes
  184. PrimaryGroupID: 30000
  185.  
  186. ~~> Setting up the build user nixbld3
  187. Exists: Yes
  188. Hidden: Yes
  189. Home Directory: /var/empty
  190.  
  191. ---- sudo execution ------------------------------------------------------------
  192. I am executing:
  193.  
  194. $ sudo usermod --comment Nix build user 3 nixbld3
  195.  
  196. in order to give nixbld3 a useful comment
  197.  
  198. usermod: no changes
  199. Note: Nix build user 3
  200. Logins Disabled: Yes
  201. Member of nixbld: Yes
  202. PrimaryGroupID: 30000
  203.  
  204. ~~> Setting up the build user nixbld4
  205. Exists: Yes
  206. Hidden: Yes
  207. Home Directory: /var/empty
  208.  
  209. ---- sudo execution ------------------------------------------------------------
  210. I am executing:
  211.  
  212. $ sudo usermod --comment Nix build user 4 nixbld4
  213.  
  214. in order to give nixbld4 a useful comment
  215.  
  216. usermod: no changes
  217. Note: Nix build user 4
  218. Logins Disabled: Yes
  219. Member of nixbld: Yes
  220. PrimaryGroupID: 30000
  221.  
  222. ~~> Setting up the build user nixbld5
  223. Exists: Yes
  224. Hidden: Yes
  225. Home Directory: /var/empty
  226.  
  227. ---- sudo execution ------------------------------------------------------------
  228. I am executing:
  229.  
  230. $ sudo usermod --comment Nix build user 5 nixbld5
  231.  
  232. in order to give nixbld5 a useful comment
  233.  
  234. usermod: no changes
  235. Note: Nix build user 5
  236. Logins Disabled: Yes
  237. Member of nixbld: Yes
  238. PrimaryGroupID: 30000
  239.  
  240. ~~> Setting up the build user nixbld6
  241. Exists: Yes
  242. Hidden: Yes
  243. Home Directory: /var/empty
  244.  
  245. ---- sudo execution ------------------------------------------------------------
  246. I am executing:
  247.  
  248. $ sudo usermod --comment Nix build user 6 nixbld6
  249.  
  250. in order to give nixbld6 a useful comment
  251.  
  252. usermod: no changes
  253. Note: Nix build user 6
  254. Logins Disabled: Yes
  255. Member of nixbld: Yes
  256. PrimaryGroupID: 30000
  257.  
  258. ~~> Setting up the build user nixbld7
  259. Exists: Yes
  260. Hidden: Yes
  261. Home Directory: /var/empty
  262.  
  263. ---- sudo execution ------------------------------------------------------------
  264. I am executing:
  265.  
  266. $ sudo usermod --comment Nix build user 7 nixbld7
  267.  
  268. in order to give nixbld7 a useful comment
  269.  
  270. usermod: no changes
  271. Note: Nix build user 7
  272. Logins Disabled: Yes
  273. Member of nixbld: Yes
  274. PrimaryGroupID: 30000
  275.  
  276. ~~> Setting up the build user nixbld8
  277. Exists: Yes
  278. Hidden: Yes
  279. Home Directory: /var/empty
  280.  
  281. ---- sudo execution ------------------------------------------------------------
  282. I am executing:
  283.  
  284. $ sudo usermod --comment Nix build user 8 nixbld8
  285.  
  286. in order to give nixbld8 a useful comment
  287.  
  288. usermod: no changes
  289. Note: Nix build user 8
  290. Logins Disabled: Yes
  291. Member of nixbld: Yes
  292. PrimaryGroupID: 30000
  293.  
  294. ~~> Setting up the build user nixbld9
  295. Exists: Yes
  296. Hidden: Yes
  297. Home Directory: /var/empty
  298.  
  299. ---- sudo execution ------------------------------------------------------------
  300. I am executing:
  301.  
  302. $ sudo usermod --comment Nix build user 9 nixbld9
  303.  
  304. in order to give nixbld9 a useful comment
  305.  
  306. usermod: no changes
  307. Note: Nix build user 9
  308. Logins Disabled: Yes
  309. Member of nixbld: Yes
  310. PrimaryGroupID: 30000
  311.  
  312. ~~> Setting up the build user nixbld10
  313. Exists: Yes
  314. Hidden: Yes
  315. Home Directory: /var/empty
  316.  
  317. ---- sudo execution ------------------------------------------------------------
  318. I am executing:
  319.  
  320. $ sudo usermod --comment Nix build user 10 nixbld10
  321.  
  322. in order to give nixbld10 a useful comment
  323.  
  324. usermod: no changes
  325. Note: Nix build user 10
  326. Logins Disabled: Yes
  327. Member of nixbld: Yes
  328. PrimaryGroupID: 30000
  329.  
  330. ~~> Setting up the build user nixbld11
  331. Exists: Yes
  332. Hidden: Yes
  333. Home Directory: /var/empty
  334.  
  335. ---- sudo execution ------------------------------------------------------------
  336. I am executing:
  337.  
  338. $ sudo usermod --comment Nix build user 11 nixbld11
  339.  
  340. in order to give nixbld11 a useful comment
  341.  
  342. usermod: no changes
  343. Note: Nix build user 11
  344. Logins Disabled: Yes
  345. Member of nixbld: Yes
  346. PrimaryGroupID: 30000
  347.  
  348. ~~> Setting up the build user nixbld12
  349. Exists: Yes
  350. Hidden: Yes
  351. Home Directory: /var/empty
  352.  
  353. ---- sudo execution ------------------------------------------------------------
  354. I am executing:
  355.  
  356. $ sudo usermod --comment Nix build user 12 nixbld12
  357.  
  358. in order to give nixbld12 a useful comment
  359.  
  360. usermod: no changes
  361. Note: Nix build user 12
  362. Logins Disabled: Yes
  363. Member of nixbld: Yes
  364. PrimaryGroupID: 30000
  365.  
  366. ~~> Setting up the build user nixbld13
  367. Exists: Yes
  368. Hidden: Yes
  369. Home Directory: /var/empty
  370.  
  371. ---- sudo execution ------------------------------------------------------------
  372. I am executing:
  373.  
  374. $ sudo usermod --comment Nix build user 13 nixbld13
  375.  
  376. in order to give nixbld13 a useful comment
  377.  
  378. usermod: no changes
  379. Note: Nix build user 13
  380. Logins Disabled: Yes
  381. Member of nixbld: Yes
  382. PrimaryGroupID: 30000
  383.  
  384. ~~> Setting up the build user nixbld14
  385. Exists: Yes
  386. Hidden: Yes
  387. Home Directory: /var/empty
  388.  
  389. ---- sudo execution ------------------------------------------------------------
  390. I am executing:
  391.  
  392. $ sudo usermod --comment Nix build user 14 nixbld14
  393.  
  394. in order to give nixbld14 a useful comment
  395.  
  396. usermod: no changes
  397. Note: Nix build user 14
  398. Logins Disabled: Yes
  399. Member of nixbld: Yes
  400. PrimaryGroupID: 30000
  401.  
  402. ~~> Setting up the build user nixbld15
  403. Exists: Yes
  404. Hidden: Yes
  405. Home Directory: /var/empty
  406.  
  407. ---- sudo execution ------------------------------------------------------------
  408. I am executing:
  409.  
  410. $ sudo usermod --comment Nix build user 15 nixbld15
  411.  
  412. in order to give nixbld15 a useful comment
  413.  
  414. usermod: no changes
  415. Note: Nix build user 15
  416. Logins Disabled: Yes
  417. Member of nixbld: Yes
  418. PrimaryGroupID: 30000
  419.  
  420. ~~> Setting up the build user nixbld16
  421. Exists: Yes
  422. Hidden: Yes
  423. Home Directory: /var/empty
  424.  
  425. ---- sudo execution ------------------------------------------------------------
  426. I am executing:
  427.  
  428. $ sudo usermod --comment Nix build user 16 nixbld16
  429.  
  430. in order to give nixbld16 a useful comment
  431.  
  432. usermod: no changes
  433. Note: Nix build user 16
  434. Logins Disabled: Yes
  435. Member of nixbld: Yes
  436. PrimaryGroupID: 30000
  437.  
  438. ~~> Setting up the build user nixbld17
  439. Exists: Yes
  440. Hidden: Yes
  441. Home Directory: /var/empty
  442.  
  443. ---- sudo execution ------------------------------------------------------------
  444. I am executing:
  445.  
  446. $ sudo usermod --comment Nix build user 17 nixbld17
  447.  
  448. in order to give nixbld17 a useful comment
  449.  
  450. usermod: no changes
  451. Note: Nix build user 17
  452. Logins Disabled: Yes
  453. Member of nixbld: Yes
  454. PrimaryGroupID: 30000
  455.  
  456. ~~> Setting up the build user nixbld18
  457. Exists: Yes
  458. Hidden: Yes
  459. Home Directory: /var/empty
  460.  
  461. ---- sudo execution ------------------------------------------------------------
  462. I am executing:
  463.  
  464. $ sudo usermod --comment Nix build user 18 nixbld18
  465.  
  466. in order to give nixbld18 a useful comment
  467.  
  468. usermod: no changes
  469. Note: Nix build user 18
  470. Logins Disabled: Yes
  471. Member of nixbld: Yes
  472. PrimaryGroupID: 30000
  473.  
  474. ~~> Setting up the build user nixbld19
  475. Exists: Yes
  476. Hidden: Yes
  477. Home Directory: /var/empty
  478.  
  479. ---- sudo execution ------------------------------------------------------------
  480. I am executing:
  481.  
  482. $ sudo usermod --comment Nix build user 19 nixbld19
  483.  
  484. in order to give nixbld19 a useful comment
  485.  
  486. usermod: no changes
  487. Note: Nix build user 19
  488. Logins Disabled: Yes
  489. Member of nixbld: Yes
  490. PrimaryGroupID: 30000
  491.  
  492. ~~> Setting up the build user nixbld20
  493. Exists: Yes
  494. Hidden: Yes
  495. Home Directory: /var/empty
  496.  
  497. ---- sudo execution ------------------------------------------------------------
  498. I am executing:
  499.  
  500. $ sudo usermod --comment Nix build user 20 nixbld20
  501.  
  502. in order to give nixbld20 a useful comment
  503.  
  504. usermod: no changes
  505. Note: Nix build user 20
  506. Logins Disabled: Yes
  507. Member of nixbld: Yes
  508. PrimaryGroupID: 30000
  509.  
  510. ~~> Setting up the build user nixbld21
  511. Exists: Yes
  512. Hidden: Yes
  513. Home Directory: /var/empty
  514.  
  515. ---- sudo execution ------------------------------------------------------------
  516. I am executing:
  517.  
  518. $ sudo usermod --comment Nix build user 21 nixbld21
  519.  
  520. in order to give nixbld21 a useful comment
  521.  
  522. usermod: no changes
  523. Note: Nix build user 21
  524. Logins Disabled: Yes
  525. Member of nixbld: Yes
  526. PrimaryGroupID: 30000
  527.  
  528. ~~> Setting up the build user nixbld22
  529. Exists: Yes
  530. Hidden: Yes
  531. Home Directory: /var/empty
  532.  
  533. ---- sudo execution ------------------------------------------------------------
  534. I am executing:
  535.  
  536. $ sudo usermod --comment Nix build user 22 nixbld22
  537.  
  538. in order to give nixbld22 a useful comment
  539.  
  540. usermod: no changes
  541. Note: Nix build user 22
  542. Logins Disabled: Yes
  543. Member of nixbld: Yes
  544. PrimaryGroupID: 30000
  545.  
  546. ~~> Setting up the build user nixbld23
  547. Exists: Yes
  548. Hidden: Yes
  549. Home Directory: /var/empty
  550.  
  551. ---- sudo execution ------------------------------------------------------------
  552. I am executing:
  553.  
  554. $ sudo usermod --comment Nix build user 23 nixbld23
  555.  
  556. in order to give nixbld23 a useful comment
  557.  
  558. usermod: no changes
  559. Note: Nix build user 23
  560. Logins Disabled: Yes
  561. Member of nixbld: Yes
  562. PrimaryGroupID: 30000
  563.  
  564. ~~> Setting up the build user nixbld24
  565. Exists: Yes
  566. Hidden: Yes
  567. Home Directory: /var/empty
  568.  
  569. ---- sudo execution ------------------------------------------------------------
  570. I am executing:
  571.  
  572. $ sudo usermod --comment Nix build user 24 nixbld24
  573.  
  574. in order to give nixbld24 a useful comment
  575.  
  576. usermod: no changes
  577. Note: Nix build user 24
  578. Logins Disabled: Yes
  579. Member of nixbld: Yes
  580. PrimaryGroupID: 30000
  581.  
  582. ~~> Setting up the build user nixbld25
  583. Exists: Yes
  584. Hidden: Yes
  585. Home Directory: /var/empty
  586.  
  587. ---- sudo execution ------------------------------------------------------------
  588. I am executing:
  589.  
  590. $ sudo usermod --comment Nix build user 25 nixbld25
  591.  
  592. in order to give nixbld25 a useful comment
  593.  
  594. usermod: no changes
  595. Note: Nix build user 25
  596. Logins Disabled: Yes
  597. Member of nixbld: Yes
  598. PrimaryGroupID: 30000
  599.  
  600. ~~> Setting up the build user nixbld26
  601. Exists: Yes
  602. Hidden: Yes
  603. Home Directory: /var/empty
  604.  
  605. ---- sudo execution ------------------------------------------------------------
  606. I am executing:
  607.  
  608. $ sudo usermod --comment Nix build user 26 nixbld26
  609.  
  610. in order to give nixbld26 a useful comment
  611.  
  612. usermod: no changes
  613. Note: Nix build user 26
  614. Logins Disabled: Yes
  615. Member of nixbld: Yes
  616. PrimaryGroupID: 30000
  617.  
  618. ~~> Setting up the build user nixbld27
  619. Exists: Yes
  620. Hidden: Yes
  621. Home Directory: /var/empty
  622.  
  623. ---- sudo execution ------------------------------------------------------------
  624. I am executing:
  625.  
  626. $ sudo usermod --comment Nix build user 27 nixbld27
  627.  
  628. in order to give nixbld27 a useful comment
  629.  
  630. usermod: no changes
  631. Note: Nix build user 27
  632. Logins Disabled: Yes
  633. Member of nixbld: Yes
  634. PrimaryGroupID: 30000
  635.  
  636. ~~> Setting up the build user nixbld28
  637. Exists: Yes
  638. Hidden: Yes
  639. Home Directory: /var/empty
  640.  
  641. ---- sudo execution ------------------------------------------------------------
  642. I am executing:
  643.  
  644. $ sudo usermod --comment Nix build user 28 nixbld28
  645.  
  646. in order to give nixbld28 a useful comment
  647.  
  648. usermod: no changes
  649. Note: Nix build user 28
  650. Logins Disabled: Yes
  651. Member of nixbld: Yes
  652. PrimaryGroupID: 30000
  653.  
  654. ~~> Setting up the build user nixbld29
  655. Exists: Yes
  656. Hidden: Yes
  657. Home Directory: /var/empty
  658.  
  659. ---- sudo execution ------------------------------------------------------------
  660. I am executing:
  661.  
  662. $ sudo usermod --comment Nix build user 29 nixbld29
  663.  
  664. in order to give nixbld29 a useful comment
  665.  
  666. usermod: no changes
  667. Note: Nix build user 29
  668. Logins Disabled: Yes
  669. Member of nixbld: Yes
  670. PrimaryGroupID: 30000
  671.  
  672. ~~> Setting up the build user nixbld30
  673. Exists: Yes
  674. Hidden: Yes
  675. Home Directory: /var/empty
  676.  
  677. ---- sudo execution ------------------------------------------------------------
  678. I am executing:
  679.  
  680. $ sudo usermod --comment Nix build user 30 nixbld30
  681.  
  682. in order to give nixbld30 a useful comment
  683.  
  684. usermod: no changes
  685. Note: Nix build user 30
  686. Logins Disabled: Yes
  687. Member of nixbld: Yes
  688. PrimaryGroupID: 30000
  689.  
  690. ~~> Setting up the build user nixbld31
  691. Exists: Yes
  692. Hidden: Yes
  693. Home Directory: /var/empty
  694.  
  695. ---- sudo execution ------------------------------------------------------------
  696. I am executing:
  697.  
  698. $ sudo usermod --comment Nix build user 31 nixbld31
  699.  
  700. in order to give nixbld31 a useful comment
  701.  
  702. usermod: no changes
  703. Note: Nix build user 31
  704. Logins Disabled: Yes
  705. Member of nixbld: Yes
  706. PrimaryGroupID: 30000
  707.  
  708. ~~> Setting up the build user nixbld32
  709. Exists: Yes
  710. Hidden: Yes
  711. Home Directory: /var/empty
  712.  
  713. ---- sudo execution ------------------------------------------------------------
  714. I am executing:
  715.  
  716. $ sudo usermod --comment Nix build user 32 nixbld32
  717.  
  718. in order to give nixbld32 a useful comment
  719.  
  720. usermod: no changes
  721. Note: Nix build user 32
  722. Logins Disabled: Yes
  723. Member of nixbld: Yes
  724. PrimaryGroupID: 30000
  725.  
  726. ---- sudo execution ------------------------------------------------------------
  727. I am executing:
  728.  
  729. $ sudo mkdir -pv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix /nix/var/nix/db /nix/var/nix/gcroots /nix/var/nix/profiles /nix/var/nix/temproots /nix/var/nix/userpool
  730.  
  731. to make the basic directory structure of Nix (part 1)
  732.  
  733. mkdir: created directory '/nix'
  734. mkdir: created directory '/nix/var'
  735. mkdir: created directory '/nix/var/log'
  736. mkdir: created directory '/nix/var/log/nix'
  737. mkdir: created directory '/nix/var/log/nix/drvs'
  738. mkdir: created directory '/nix/var/nix'
  739. mkdir: created directory '/nix/var/nix/db'
  740. mkdir: created directory '/nix/var/nix/gcroots'
  741. mkdir: created directory '/nix/var/nix/profiles'
  742. mkdir: created directory '/nix/var/nix/temproots'
  743. mkdir: created directory '/nix/var/nix/userpool'
  744.  
  745. ---- sudo execution ------------------------------------------------------------
  746. I am executing:
  747.  
  748. $ sudo mkdir -pv -m 1777 /nix/var/nix/gcroots/per-user /nix/var/nix/profiles/per-user
  749.  
  750. to make the basic directory structure of Nix (part 2)
  751.  
  752. mkdir: created directory '/nix/var/nix/gcroots/per-user'
  753. mkdir: created directory '/nix/var/nix/profiles/per-user'
  754.  
  755. ---- sudo execution ------------------------------------------------------------
  756. I am executing:
  757.  
  758. $ sudo mkdir -pv -m 1775 /nix/store
  759.  
  760. to make the basic directory structure of Nix (part 3)
  761.  
  762. mkdir: created directory '/nix/store'
  763.  
  764. ---- sudo execution ------------------------------------------------------------
  765. I am executing:
  766.  
  767. $ sudo chgrp nixbld /nix/store
  768.  
  769. to make the basic directory structure of Nix (part 4)
  770.  
  771.  
  772. ---- sudo execution ------------------------------------------------------------
  773. I am executing:
  774.  
  775. $ sudo mkdir -pv -m 0755 /nix/var/nix/profiles/per-user/root
  776.  
  777. to set up the root user's profile (part 1)
  778.  
  779. mkdir: created directory '/nix/var/nix/profiles/per-user/root'
  780.  
  781. ---- sudo execution ------------------------------------------------------------
  782. I am executing:
  783.  
  784. $ sudo mkdir -pv -m 0700 /root/.nix-defexpr
  785.  
  786. to set up the root user's profile (part 2)
  787.  
  788. mkdir: created directory '/root/.nix-defexpr'
  789.  
  790. ---- sudo execution ------------------------------------------------------------
  791. I am executing:
  792.  
  793. $ sudo mkdir -pv -m 0555 /etc/nix
  794.  
  795. to place the default nix daemon configuration (part 1)
  796.  
  797. mkdir: created directory '/etc/nix'
  798.  
  799. ---- sudo execution ------------------------------------------------------------
  800. I am executing:
  801.  
  802. $ sudo install -m 0664 /tmp/tmp.I1SJL2Eia3/.nix-channels /root/.nix-channels
  803.  
  804. to set up the default system channel (part 1)
  805.  
  806.  
  807. ---- sudo execution ------------------------------------------------------------
  808. I am executing:
  809.  
  810. $ sudo rsync -rlpt ./store/1n9vf0s7ba7ijn33d197mxm6mq7bgagf-sqlite-3.26.0 ./store/1slay2nphxq5mxj71jsra91rhvfd2zns-acl-2.2.52 ./store/3jh2d752bf78b9j9f72qcq952azj2ffb-busybox-1.29.3 ./store/3s920c43pgzi6vdabjs90in308jnbckv-zlib-1.2.11 ./store/496zwrkpwn0x1kcayyg23i5j6cd52byj-boehm-gc-7.6.6 ./store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1 ./store/5icsaq8hr9r2kas4d6004najnad8v9ja-libatomic_ops-7.6.4 ./store/5rd9qb6jkzkgd18dm1b379m8439cszac-bzip2-1.0.6.0.1-bin ./store/6nca8qrnkwjigwzcrivhi2zc67afx7x4-curl-7.62.0 ./store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27 ./store/7lxsfdhf8wngask6kpjmgjlpp27ifrqa-libseccomp-2.3.3-lib ./store/8yzzlmfwcxj21scpmj479ihfryg7rnl2-editline-1.15.3 ./store/95i38z61425xrci8h178blwff88p0a4h-gcc-7.3.0-lib ./store/a9i0a06gcs8w9fj9nghsl0b6vvqpzpi4-bash-4.4-p23 ./store/bgv7sypfxl64bdy76l055nghmds8ndgl-xz-5.2.4-bin ./store/c05hsri06skf875m5ajqjfr0sxd3wqmy-keyutils-1.5.10-lib ./store/dm20hrdk6s4jzfmk1197p2nya0p8fy3a-coreutils-8.29 ./store/fna8lggi520pgvdwi8p1xyzcj9706j04-nss-cacert-3.40.1 ./store/i8gaw7zz64q8acpw4yj08nbv6mkgxqkw-nghttp2-1.32.0-lib ./store/ilw7xkfpkc8ans09rqcr2sdglzpk22nv-libkrb5-1.15.2 ./store/jrzx61apa5js1pll43q7q5gxacz8whjj-xz-5.2.4 ./store/k4bbyj27b3ly74w276zxn939vvbhn8jw-libsodium-1.0.16 ./store/nkqllhj5871sqgvmhw3zbm7nf4a9mwd9-aws-sdk-cpp-1.5.17 ./store/qyqrqdhh65pppdpblh3m1k36pa03rbpc-openssl-1.0.2p ./store/svlam1p9832s0v2jcrz3a10vhb7yi896-brotli-1.0.5-lib ./store/xgk63lh5nlc76cpm2ak1rx2l7lxqlk9n-bzip2-1.0.6.0.1 ./store/y2574qr6gs3s0qqdjg6lhsgn76bablz5-attr-2.4.47 ./store/yaqbs91c3p88lhwjgnaf6xk5fcr0mpiq-libssh2-1.8.0 ./store/z5r5s8ccp7hlxkmaijhdikppcawa6d0p-gnutar-1.30 ./store/zrzqgdm6jxihsban195vrlcskmx9m4zc-gzip-1.9 /nix/store/
  811.  
  812. to copy the basic Nix files to the new store at /nix/store
  813.  
  814. Alright! We have our first nix at /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1
  815.  
  816. ---- sudo execution ------------------------------------------------------------
  817. I am executing:
  818.  
  819. $ sudo /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-store --init
  820.  
  821. to initialize the Nix Database
  822.  
  823.  
  824. ---- sudo execution ------------------------------------------------------------
  825. I am executing:
  826.  
  827. $ sudo /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-store --load-db
  828.  
  829. to load data for the first time in to the Nix Database
  830.  
  831. Just finished getting the nix database ready.
  832.  
  833. ---- sudo execution ------------------------------------------------------------
  834. I am executing:
  835.  
  836. $ sudo touch /etc/profile.d/nix.sh
  837.  
  838. create a stub /etc/profile.d/nix.sh which will be updated
  839.  
  840.  
  841. ---- sudo execution ------------------------------------------------------------
  842. I am executing:
  843.  
  844. $ sudo cp /etc/profile.d/nix.sh /etc/profile.d/nix.sh.backup-before-nix
  845.  
  846. to back up your current /etc/profile.d/nix.sh to /etc/profile.d/nix.sh.backup-before-nix
  847.  
  848.  
  849. ---- sudo execution ------------------------------------------------------------
  850. I am executing:
  851.  
  852. $ sudo tee -a /etc/profile.d/nix.sh
  853.  
  854. extend your /etc/profile.d/nix.sh with nix-daemon settings
  855.  
  856.  
  857. # Nix
  858. if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  859. . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
  860. fi
  861. # End Nix
  862.  
  863.  
  864. ---- sudo execution ------------------------------------------------------------
  865. I am executing:
  866.  
  867. $ sudo HOME=/root /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-env -i /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1
  868.  
  869. to installing a bootstrapping Nix in to the default Profile
  870.  
  871. installing 'nix-2.2.1'
  872. building '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv'...
  873. error: opening directory '/nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1': Permission denied
  874. builder for '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv' failed with exit code 1
  875. error: build of '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv' failed
  876.  
  877. ---- oh no! --------------------------------------------------------------------
  878. Jeeze, something went wrong. If you can take all the output and open
  879. an issue, we'd love to fix the problem so nobody else has this issue.
  880.  
  881. :(
  882.  
  883. We'd love to help if you need it.
  884.  
  885. If you can, open an issue at https://github.com/nixos/nix/issues
  886.  
  887. Or feel free to contact the team,
  888. - on IRC #nixos on irc.freenode.net
  889. - on twitter @nixos_org
  890.  
  891. ```
  892.  
  893. I try to run manually, but get same error.
  894.  
  895. ```
  896. # HOME=/root /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-e
  897. nv -i /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1
  898. installing 'nix-2.2.1'
  899. building '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv'...
  900. error: opening directory '/nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1': Permi
  901. ssion denied
  902. builder for '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv' failed w
  903. ith exit code 1
  904. error: build of '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv' fail
  905. ed
  906. ```
  907.  
  908. Check Permissions
  909. ```
  910. # ll /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-env
  911. lrwxrwxrwx 1 root root 3 Dec 31 1969 /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-env -> nix*
  912.  
  913. # ll /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix
  914. -rwxr-x--- 1 root root 1703040 Dec 31 1969 /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix*
  915. ```
  916.  
  917. Seem fine, Let's see what `nix-env` is failing on using `strace`
  918.  
  919. ```
  920. # 2> err strace /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1/bin/nix-env -i /nix/store/5hdmx9yk7gr71b98j4vh9271k0zg5jis-nix-2.2.1
  921. # sp; tail -n 20 err
  922.  
  923.  
  924. close(8) = 0
  925. unlink("/nix/var/nix/temproots/27094") = 0
  926. stat("/nix/var/nix/db/db.sqlite", {st_mode=S_IFREG|0644, st_size=53248, ...}) = 0
  927. fcntl(4, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
  928. fcntl(4, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0
  929. unlink("/nix/var/nix/db/db.sqlite-shm") = 0
  930. munmap(0x7f8aa289e000, 32768) = 0
  931. close(6) = 0
  932. close(5) = 0
  933. unlink("/nix/var/nix/db/db.sqlite-wal") = 0
  934. fcntl(4, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=2}) = 0
  935. fcntl(4, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
  936. fstat(4, {st_mode=S_IFREG|0644, st_size=53248, ...}) = 0
  937. stat("/nix/var/nix/db/db.sqlite", {st_mode=S_IFREG|0644, st_size=53248, ...}) = 0
  938. close(4) = 0
  939. close(3) = 0
  940. write(2, "error: build of '/nix/store/jkcb"..., 90error: build of '/nix/store/jkcbkr60gzcmz6bk9y4j4bhlx8qcqcyz-user-environment.drv' failed
  941. ) = 90
  942. exit_group(100) = ?
  943. +++ exited with 100 +++
  944. ```
  945.  
  946. What could exit 100 mean?
  947. ```
  948. # errno --list | grep 100
  949. ENETDOWN 100 Network is down
  950. ```
  951.  
  952. https://sqlite.org/c3ref/c_abort.html
  953. ```
  954. #define SQLITE_ROW 100 /* sqlite3_step() has another row ready */
  955. ```
  956.  
  957. Single user works fine.. something borked..
  958. ```
  959. # sp; uname -s
  960. Linux
  961. # uname -m
  962. x86_64
  963. # lsb_release -a
  964. No LSB modules are available.
  965. Distributor ID: Ubuntu
  966. Description: Ubuntu 16.04.1 LTS
  967. Release: 16.04
  968. Codename: xenial
  969. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement