Category Archives: Linux

cmd/go: unsupported GOOS/GOARCH pair linux /amd64 [How to Solve]

When compiling the go project under windowds, when you perform the following operations:

SET CGO_ENABLED = 0 
set GOARCH = amd64
 set GOOS = linux
go build main.go

The operation of set GOOS= linux is followed by a space after the linux, the compiler cannot automatically remove the space, causing the compilation to fail.
end!

[Solved] Nginx Restart Error: nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)

nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)

This error is: the pid file is missing in the logs directory.

Solution: Re-specify the configuration file loaded at startup, and then restart. If the nginx configuration file directory is: /usr/local/nginx/conf/nginx.conf

First execute the command: /usr/local/nginx/sbin/nginx -c/usr/local/nginx/conf/nginx.conf

Then: /usr/local/nginx/sbin/nginx -s reload for smooth restart, no error will be reported

[Solved] Centos6.8 yum Error: YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid

problem

Error when installing software using yum

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt

Solution

1. View yum configuration file

vim /etc/yum.repos.d/CentOS-Base.repo

2. Add a comment to the mirrorlist in the original configuration, and delete the comment from the baseurl to make it effective. Take the base module as an example, and the other modules are treated the same

base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

It still doesn’t work because the baseurl link mirror.centos.org has no resources.

3. Reconfigure the resource path https://vault.centos.org/6.8/

Modified configuration

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=https://vault.centos.org/6.8/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=https://vault.centos.org/6.8/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://vault.centos.org/6.8/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://vault.centos.org/6.8/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
baseurl=https://vault.centos.org/6.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

4. Clean the cache

yum clean all
rm -rf /var/cache/yum
yum makecache

Run again

lgwr terminating the adg database instance due to error 4021 [How to Solve]

Due to the configuration of oracle restart, the database instance will automatically start to read-only mode after it goes down. Data synchronization needs to be started manually. Several failures are at night. Before finding the cause, add zabbix to monitor the adg synchronization status. When the synchronization stops, it will be issued. Early warning for timely processing.

 

Check the database log and found the following error:

ORA-04021: timeout occurred while waiting to lock object
LGWR (ospid: 9817): terminating the instance due to error 4021

Query mos, suspected oracle bug, oracle gave a repair method, increase the shadow parameter: ALTER SYSTEM set “_adg_parselock_timeout”=550 scope=both

So adjust the parameters, restart the database, observe for a period of time, the downtime does not appear again, hereby record.

[Solved] Dell server kernel error: ACPI: No handler for Region [POWR] (ffff88012e5ad2b8) [IPMI]

Model: H7YZ622

Error:

Jul 19 08:04:57 mail kernel : ACPI: No handler for Region [POWR] (ffff88012e5ad2b8) [IPMI]

Symptoms are to be seen, and the Internet says it will cause an automatic restart .

 

# Online collection solutions (try after the automatic restart appears)

Method 1: (to be tested)

# vi /boot/grub/grub.conf

Add intremap=off or intremap=no_x2apic_optout at the end of the kernel line

 Then restart the server.
Parameter explanation:
intremap={on,off,nosid,no_x2apic_optout}
on: (default value) enable interrupt remapping, which is enabled by default in BIOS
off: turn off interrupt remapping
nosid: SID (Source ID) is not checked during remapping
no_x2apic_optout: Ignore the BIOS settings and force the x2APIC feature to be disabled. It is mainly used to solve some faults caused by the BIOS that has defective x2APIC support

Method 2: (This method will cause multi-core to single-core, use with caution in production environment ) 
# vi /boot/grub/grub.conf
Add acpi=off noacip at the end of the kernel line, and turn off the advanced power management interface as follows:
kernel … acpi=off noacip

Method 3: Upgrade the kernel ( use with caution in production environment )

# yum install kernel

GaiHab local warehouse and remote library link error [How to Fix]

  • Run the command in the local warehouse
    Administrator@DESKTOP-NBQP9GO MINGW64 /d/learngit (master) $ git remote add origin [email protected]:usename/xxx.git
  • If there is an error
  • error: remote origin already exists.
  • Administrator@DESKTOP-NBQP9GO MINGW64 /d/learngit (master) $ git remote rm origin //remove and then continue...
  • Pull remote update push
  • //After the first remote association, you must first pull a remote update.
  • Administrator@DESKTOP-NBQP9GO MINGW64 /d/learngit (master) $ git pull
  • Push local library to remote
  • Administrator@DESKTOP-NBQP9GO MINGW64 /d/learngit (master) $ git push -u origin master
  • Note: Add -u to the first push to facilitate future push or pull

    git push origin master

[Solved] stdout: ERROR: post-link.sh was unable to download any of the following URLs

conda install --use-local bioconductor-genomeinfodbdata-1.2.0-r351_0.tar.bz2An error occurred when using supercomputer local installation .
The main reason is that supercomputing does not allow links to external networks, and other data will be downloaded when the package is installed, so an error occurs.
So just download the files needed by genomeinfodbdata and place them in the folder where the library is located.

THE DISCUZQ VIRTUALBOX VIRTUAL MACHINE SETS A SOFT LINK IN THE SHARED FOLDER. PROTOCOL ERROR IS REPORTED.

cd C:\Program Files\Oracle\VirtualBox //installation directory

VBoxManage.exe setextradata centos VBoxInternal2/SharedFoldersEnableSymlinksCreate/wwwroot 1 //centos virtual machine name wwwroot shared folder name

VBoxManage getextradata centos enumerate //The test result is similar to the following side success

Key: GUI/LastCloseAction, Value: Shutdown

Key: GUI/LastNormalWindowPosition, Value: 539,208,800,651

Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/wwwroot, Value: 1

last step: Restart the virtual machine as an administrator