# 在新创建的VPN上干净安装Ubuntu 22.04失败

**URL:** <https://meta.discourse.org/t/clean-install-on-freshly-spawned-vpn-with-ubuntu-22-04-fails/295039>\
**Category:** Self-hosting\
**Created:** [2024年二月12日 06:55 UTC](https://meta.discourse.org/t/clean-install-on-freshly-spawned-vpn-with-ubuntu-22-04-fails/295039 "2024-02-12T06:55:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ale\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ale_d/32/362490_2.png) [@Ale\_D](https://meta.discourse.org/u/Ale_D)\
**Post date:** [2024年二月12日 06:55 UTC](https://meta.discourse.org/t/clean-install-on-freshly-spawned-vpn-with-ubuntu-22-04-fails/295039/1 "2024-02-12T06:55:02Z")

</div>

在 Ubuntu 22.04 上使用 [标准安装](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md) 进行的干净安装一直失败。  
我看到了这些错误，但不知道需要检查什么来解决它（我是 Discourse 新手）。

```plaintext
I, [2024-02-12T06:24:53.611992 #1] INFO -- : cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile'
Node.js heap_size_limit (1956.0) is less than 2048MB. Setting --max-old-space-size=2048.
Purging temp files
Bundling assets
#<Thread:0x00007f53d0e37ff8 /var/www/discourse/lib/tasks/maxminddb.rake:62 run> terminated with exception (report_on_exception is true):
/var/www/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil:NilClass (NoMethodError)

    filename = File.basename(gz_file.path)
                                    ^^^^^
	from /var/www/discourse/lib/tasks/maxminddb.rake:67:in `block (3 levels) in <main>'
	from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `each'
	from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `block (2 levels) in <main>'

```

```plaintext
Done compiling CSS: 2024-02-12 06:27:28 UTC
/var/www/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil:NilClass (NoMethodError)

    filename = File.basename(gz_file.path)
                                    ^^^^^
	from /var/www/discourse/lib/tasks/maxminddb.rake:67:in `block (3 levels) in <main>'
	from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `each'
	from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `block (2 levels) in <main>'
I, [2024-02-12T06:27:28.245776 #1] INFO -- : yarn run v1.22.19
$ /var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build

```

最后是这个

```plaintext
Done in 122.74s.
Downloading MaxMindDB...
Compressing Javascript and Generating Source Maps

I, [2024-02-12T06:27:28.246766 #1] INFO -- : Terminating async processes
I, [2024-02-12T06:27:28.246802 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 57
I, [2024-02-12T06:27:28.246832 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 126
2024-02-12 06:27:28.246 UTC [57] LOG: received fast shutdown request
126:signal-handler (1707719248) Received SIGTERM scheduling shutdown...
2024-02-12 06:27:28.248 UTC [57] LOG: aborting any active transactions
2024-02-12 06:27:28.250 UTC [57] LOG: background worker "logical replication launcher" (PID 66) exited with exit code 1
2024-02-12 06:27:28.251 UTC [61] LOG: shutting down
126:M 12 Feb 2024 06:27:28.258 # User requested shutdown...
126:M 12 Feb 2024 06:27:28.258 * Saving the final RDB snapshot before exiting.
126:M 12 Feb 2024 06:27:28.263 * DB saved on disk
126:M 12 Feb 2024 06:27:28.263 # Redis is now ready to exit, bye bye...
2024-02-12 06:27:28.409 UTC [57] LOG: database system is shut down

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 3428 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 1

```

我错过了什么？

---

<div class="post-metadata">

**Author:** ![Ale\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ale_d/32/362490_2.png) [@Ale\_D](https://meta.discourse.org/u/Ale_D)\
**Post date:** [2024年二月12日 07:35 UTC](https://meta.discourse.org/t/clean-install-on-freshly-spawned-vpn-with-ubuntu-22-04-fails/295039/2 "2024-02-12T07:35:33Z")

</div>

没关系，还是 [MaxMind](https://meta.discourse.org/t/update-fails-with-unexpected-error-during-rebuild/288718) 的问题，清除它之后安装就成功了。

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2024年三月13日 07:35 UTC](https://meta.discourse.org/t/clean-install-on-freshly-spawned-vpn-with-ubuntu-22-04-fails/295039/3 "2024-03-13T07:35:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
