Skip to content

Commit de93a45

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/SupportArticles-docs-pr (branch live)
2 parents 7ee1911 + 88a8ffd commit de93a45

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

support/azure/virtual-machines/linux/apt-common-issues-in-ubuntu.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ An Azure firewall or virtual appliance might be acting as a protective barrier b
112112

113113
#### Solution 3: Make sure that the Ubuntu address is allowed
114114

115-
Make sure that `azure.archive.ubuntu.com` and any other repository URLs are fully accessible. To do this, take the following actions:
115+
Make sure that `azure.archive.ubuntu.com` and any other repository URLs are fully accessible. To do this step, take the following actions:
116116

117117
1. Verify that the destination URLs are allowed in firewall policies.
118118

@@ -146,13 +146,13 @@ Acquire::https::Proxy "http://[username]:[password]@ [proxy-web-or-IP-address]:[
146146

147147
Additionally, for Ubuntu and other Unix-like operating systems, you can set up a proxy for HTTP and HTTPS traffic by using environment variables. The relevant environment variables are `http_proxy` and `https_proxy`. To verify whether a proxy is configured, run the following command.
148148

149-
> [!IMPORTANT]
150-
> If no proxy server exists between the Ubuntu VM and the Ubuntu repository addresses, search for and remove any proxy configuration settings that are in the */etc/apt/apt.conf* file.
151-
152149
```bash
153150
env | grep -i proxy
154151
```
155152

153+
> [!IMPORTANT]
154+
> If no proxy server exists between the Ubuntu VM and the Ubuntu repository addresses, search for and remove any proxy configuration settings that are in the */etc/apt/apt.conf* file.
155+
156156
</details>
157157

158158
## Scenario 2: "apt update" command fails and returns "Failed to fetch \<url> 470 status code 470"
@@ -314,11 +314,11 @@ E: Sub-process /usr/bin/dpkg returned an error code (1)
314314

315315
### Cause: A syntax error exists in /etc/default/grub
316316

317-
A syntax error in the */etc/default/grub* configuration file exists. The post-installation script for the *linux-image-5.4.0-1051-azure* package is probably encountering this error while it tries to parse the configuration.
317+
A syntax error in the */etc/default/grub* configuration file exists. The post-installation script for the *linux-image-5.4.0-1051-azure* package likely encounters this error when it tries to parse the configuration.
318318

319319
#### Solution: Fix the syntax error in /etc/default/grub
320320

321-
Look for any syntax errors in the */etc/default/grub* file, particularly around the line that the post-installation script is probably encountering. Fix any syntax errors that you find. The syntax for this file is crucial for the correct functioning of the GRand Unified Bootloader (GRUB).
321+
Look for any syntax errors in the */etc/default/grub* file, particularly around the line that the post-installation script is probably encountering. Fix any syntax errors that you find. The syntax for this file is crucial for the correct functioning of the Grand Unified Bootloader (GRUB).
322322

323323
In the following example, the missing closing quotation mark in the `GRUB_CMDLINE_LINUX` line causes a syntax error in the GRUB configuration file:
324324

@@ -397,7 +397,7 @@ Remove or comment out the lines that reference the ARM processor architecture in
397397
<details>
398398
<summary>Scenario 7 details</summary>
399399

400-
When you run the `apt update` command, the system tries to fetch package information from multiple sources. However, you receive an error message about `Unknown error executing apt-key` shown in the following output:
400+
When you run the `apt update` command, the system tries to fetch package information from multiple sources. However, you receive an error message that mentions `Unknown error executing apt-key`, as shown in the following output:
401401

402402
```bash
403403
@@ -423,7 +423,9 @@ W: An error occurred during the signature verification. The repository is not up
423423
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://azure. archive.ubuntu.com/ubuntu jammy-security InRelease: Unknown error executing apt-key
424424
```
425425
426-
### Cause: Permission issues affecting the keys under `/etc/apt/trusted.gpg.d ` can be seen when running apt with debug flags
426+
### Cause
427+
428+
Permission issues affect the keys under `/etc/apt/trusted.gpg.d`. These issues appear if you run apt together with debug flags:
427429
428430
```bash
429431
$ sudo apt update -oDebug::Acquire::gpgv=1
@@ -436,17 +438,21 @@ http://azure.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease: The key(s)
436438
...
437439
```
438440
439-
#### Solution: Correct permissions to be 644 for the key files under `/etc/apt/trusted.gpg.d` and also check the default umask for your installation
441+
#### Solution
442+
443+
Correct the permissions to be **644** for the key files under `/etc/apt/trusted.gpg.d`. Additionally, check the default umask for your installation.
444+
445+
1. Correct the permission for the keyring files:
440446
441-
1) Correct permission for the keyring files
442447
```bash
443448
$ sudo chown 644 /etc/apt/trusted.gpg.d/*.gpg
444449
```
445450
446-
2) Check the default umask set by running
451+
2. Check the default umask set by running the following code:
452+
447453
```bash
448454
$ sudo umask
449455
```
450456
451-
The default umask for most distros is usually set under `/etc/login.defs` and it is set to 0022. There have been cases where the umask was being set to 0777 which results in null permissions for created files.
457+
The default umask for most distros is usually set under `/etc/login.defs`. It's set to **0022**. In some cases, the umask is set to **0777**. This setting causes null permissions for created files.
452458
</details>

0 commit comments

Comments
 (0)