Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

Update issues with Gradle in Android Studio

Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-8.6-bin.zip'. Reason: java.net.UnknownHostException: github.com

Please ensure gradle distribution url is correct. If you are behind an HTTP proxy, please configure the proxy settings.

I followed several videos on You Tube but none of them hit the nail on the head I have the latest version of Medusa installed and in theory I have the latest version of Gradle installed but it still shows me that message

Python library face-recognition not installing on raspberry pi 3

I am trying to install face-recognition library for python on raspberry pi 3. But it's not installing, every time i try to install it gives the following error as shown in the given image. Error on installation of library. Whatever i do, its the same as it is.

Some settings of my system,

Hardware : Raspberry Pi 3 model A+

OS : Raspbian OS, a Debian based distro of Linux

Python version : 3.11.3

face-recognition lib version : 1.3.0

I am installing library in a virtual environment.

I ran the following commands. All of these, I found, from the internet.

  • This is due to maybe some cached installations are causing the issue.

    pip install --no-cache-dir face-recognition

  • If the setuptools are of older version, that can be an issue.

    pip install --upgrade pip setuptools

  • Installing the dependencies from face-recognition separately.

    pip install cmake dlib

  • After that, I tried to install the library by, first cloning the repo, and then install from the local.

    git clone https://github.com/ageitgey/face_recognition.git cd face_recognition pip install .

  • The previous one also didn't worked. so, I found that one. If there is a network issue, maybe large amount of data isn't downloaded at once, so, first download a small part of it, and then fetch the complete repo.

    $ git clone https://github.com/ageitgey/face_recognition.git --depth 1 $ cd face_recognition $ git fetch --unshallow

  • Then at last, I tried downloading using ssh. and it didn't worked.

    $ git clone [email protected]:ageitgey/face_recognition.git

First I also tried installing using the apt package manager, but it also didn't worked. So, I created a virtualvenv. I am expecting the library to be installed.

Different java versions available at the same time - how to delete all

I currently have several versions of java on my Mac: 8, 11, 17, 20, and 21. When I do /usr/libexec/java_home -V, it shows:

Matching Java Virtual Machines (4):
    21.0.2 (arm64) "Oracle Corporation" - "Java SE 21.0.2" /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
    20.0.2 (arm64) "Amazon.com Inc." - "Amazon Corretto 20" /Users/lezoe/Library/Java/JavaVirtualMachines/corretto-20.0.2.1/Contents/Home
    17.0.10 (arm64) "Amazon.com Inc." - "Amazon Corretto 17" /Users/lezoe/Library/Java/JavaVirtualMachines/corretto-17.0.10/Contents/Home
    11.0.22 (arm64) "Homebrew" - "OpenJDK 11.0.22" /opt/homebrew/Cellar/openjdk@11/11.0.22/libexec/openjdk.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home

I recently downloaded java version 8.402 and it automatically set that version as default. But I can't find that version anywhere. I also tried to switch to other version using /usr/libexec/java_home -v 11.0.22, but no matter what, when I check current version of java by java -version, it still shows

openjdk version "1.8.0_402"
OpenJDK Runtime Environment Corretto-8.402.07.1 (build 1.8.0_402-b07)
OpenJDK 64-Bit Server VM Corretto-8.402.07.1 (build 25.402-b07, mixed mode)

I think I messed up something. How can I solve the issue, or how can I uninstall them all to reinstall later?

Thank you so much!

I tried to uninstall version 8., but when I check java -version, it's still there.

How to Exit Installer on Button Click Without Confirmation During Modify Process?

I'm working with Advanced Installer to create a setup package for my application. During the modification process, I've introduced a scenario where users can update their data through a custom UI. In this UI, there's an "Exit" button that, when clicked, should immediately close the installer without prompting any confirmation dialogs and effectively abort the installation process.

My current implementation involves adding a "Terminate Process" custom action, specifying "MyInstaller.exe" as the parameter. This custom action is triggered by the "Exit" button at the end of the modify dialog. While this method works, it forcibly terminates the installer process, which doesn't seem like the most graceful way to exit.

I'm seeking a more elegant solution that allows the installer to close immediately upon the button click, without navigating to the exit page or displaying any confirmation prompts to the user. Is there a better approach to achieve this behavior in Advanced Installer?

Note: The requirement is to ensure that the installer exits directly without any further user interaction or displaying the exit page.

Go settings for windows behind corporate proxy to fix could not import <package>

My go 1.21.1 configuration must be incomplete / or has wrong settings because i can not import / use modules.

I would like to have these settings

  • my code / my projects should be located under c:\dev\golang\ for example c:\dev\golang\gormHelloWorld
  • if packages / dependencies could be placed under c:\dev\godeps\ would be great but not required

Currently i have these settings

  1. Gopath is set GOPATH=c:\dev\golang and
  2. Goroot is set GOROOT=C:\Program Files\Go
  3. Our proxy requires username + password for outgoing traffic. The variables %http_proxy% and %https_proxy% are both set to http://<myuser>:<mypass>@our.proxy.abc:8080 (no https only http)
  4. It seems that nothing of relevance is below GOROOT because C:\Program Files\Go>dir /s *gorm* returns no file found.

Assumptions

I have these assumptions:

  • my config lacks settings for the corporate proxy or
  • my environment / path settings are incomplete or wrong: for example the settings for GOWORK or GOROOT

What did i read?

I have read "could not import current file is not included in a workspace module" in VS Code and also Go Wiki: Setting GOPATH for Windows and scanned the FAQ but was not able to solve my issue.

What did i do?

  1. created a folder C:\dev\golang>mkdir gormHelloWorld and cd into gormHelloWorld
  2. created a file inside C:\dev\golang\gormHelloWorld> using ECHO package main>hellogorm.go
  3. open vscode C:\dev\golang\gormHelloWorld>code .
  4. add code below to hellogorm.go
  5. run go get -u gorm.io/gorm and go get -u gorm.io/driver/sqlite both return nothing <-- could this be a proxy issue?
  6. enter C:\dev\golang\gormHelloWorld>go run . which results in hellogorm.go:4:6: missing import path
  7. in the code file i still have could not import gorm.io/driver/sqlite (cannot find package "gorm.io/driver/sqlite" in GOROOT or GOPATH)
  8. Reading up How do I fix VS Code error: "Not able to determine import path ... i checked env variables C:\dev\golang\gormHelloWorld>go env see list below.
package main

import (
    "fmt"
    "gorm.io/driver/sqlite" // could not import ... cannot find package ... in GOROOT or GOPATH
    "gorm.io/gorm" // could not ... as above
)

type Product struct {
    gorm.Model
    Code  string
    Price uint
}

func main() {
    fmt.Println("Hello World to use Gorm")
    db, err := gorm.Open(sqlite.Open("test.db"), &gorm.Config{})
    if err != nil {
        panic("failed to connect database")
    }
    db.AutoMigrate(&Product{})

    var product Product
    if db.First(&product).Error == gorm.ErrRecordNotFound {
        fmt.Println("no product record, creating now...")
        db.Create(&Product{Code: "D42", Price: 100})
    } else {
        fmt.Printf("product record found: %v", product)
    }
}

)

Go env

Output of go env

C:\dev\golang\CarConfig\gorm>go env
set GO111MODULE=off
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\<myuser>\AppData\Local\go-build
set GOENV=C:\Users\<myuser>\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\<myuser>\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\<myuser>\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set GOWORK=C:\dev\golang\<SomeOtherProject>\gorm\go.work
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\<myuser>\AppData\Local\Temp\go-build4080445693=/tmp/go-build -gno-record-gcc-switches

Xampp MySQL not starting - "Attempting to start MySQL service..."

I've just installed XAMPP for Windows - should be the newest version (XAMPP Control Panel v3.2.1).

Apache is running just fine on port 80 and 443, but MySQL is not starting. When I press the start button, I get this message:

Attempting to start MySQL service...

Then a window pops up and asks me if I want to allow this, which I want. But nothing happens after that. I can press as many times as I want, but with the same result.

What can I do with MySQL?

Issues installing MySQL in MacOS

I've been trying to install MySQL and have followed multiple tutorials on how do to so. I followed a Mac tutorial that had me create and edit the file zshrc and add the path for mysql bin.I keep running into this issue: Connection Warning (Local instance 3306). After this I went back to my terminal and it stopped recognizing basic commands. I'm brand new to all of this and I'm very sure of the next step to take.

I tried the ls, brew, open, vim, nano, echo commands and it responded "Command not found" for each.

Here's basically what it looks like when I open my terminal now:

/Users/Userexample/.zshrc:export:2: not valid in this context: /opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/mysql-8.3.0-macos14-arm64/bin Userexample's-MacBook-Air ~ % nano ~/.zshrc

installation of postgis33_15 on Rocky Linux 8 fails

When I try to install postgis33_15 on Rocky Linux 8, I end up with the following error

package postgis33_15-3.3.1-1.rhel8.x86_64 from pgdg15 requires gdal35-libs >= 3.5.2, but none of the providers can be installed
 package postgis33_15-3.3.1-1.rhel8.x86_64 from pgdg15 requires libgdal.so.31()(64bit), but none of the providers can be installed
...
 conflicting requests
  - nothing provides libarmadillo.so.10()(64bit) needed by gdal35-libs-3.5.3-4.rhel8.x86_64 from pgdg-common

internet suggests to enable EPEL and crb, but it's already done (CRB is showing up under name powertools)

sudo dnf repolist
repo id        repo name
appstream      Rocky Linux 8 - AppStream
baseos         Rocky Linux 8 - BaseOS
epel           Extra Packages for Enterprise Linux 8 - x86_64
extras         Rocky Linux 8 - Extras
pgdg-common    PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux 8 - x86_64
pgdg12         PostgreSQL 12 for RHEL / Rocky / AlmaLinux 8 - x86_64
pgdg13         PostgreSQL 13 for RHEL / Rocky / AlmaLinux 8 - x86_64
pgdg14         PostgreSQL 14 for RHEL / Rocky / AlmaLinux 8 - x86_64
pgdg15         PostgreSQL 15 for RHEL / Rocky / AlmaLinux 8 - x86_64
pgdg16         PostgreSQL 16 for RHEL / Rocky / AlmaLinux 8 - x86_64
powertools     Rocky Linux 8 - PowerTools

so now I wonder what am I missing :) Any suggestions are appreciated!

How do I center the UI and stretch the shape over the entire resolution? NSIS

I put the MUI_PAGE_COMPONENTS form. Next, for the installer, I set the resolution to 1280 by 720.

!define WIDTH 1280
!define HEIGHT 720

Function .onGUIInit
    GetDlgItem $0 $HWNDPARENT 1000 
    System::Call 'user32::MoveWindow(i $HWNDPARENT, i 0, i 0, i ${WIDTH}, i ${HEIGHT}, i 1)' MoveWindow(i $0, i 0, i 0, i ${WIDTH}, i ${HEIGHT}, i 1)' 
FunctionEnd

But all the UI elements are located in the upper-left corner. Is it possible to center and stretch the form (UI elements) to the entire size of the window? If not, how do I stretch the component box and description box?

screenshot

I searched , but I never found an easy solution. Is it really impossible to manipulate elements of ready-made forms?

“ModuleNotFoundError: No module named 'zlib',python3.12.0 install failed

When I install python3.12.0 via source code on ubuntu, I get an error as follows:

Traceback (most recent call last):
  File "<frozen zipimport>", line 518, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen zipimport>", line 566, in _get_data
  File "<frozen zipimport>", line 521, in _get_decompress_func
zipimport.ZipImportError: can't decompress data; zlib not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "<frozen runpy>", line 222, in run_module
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "<frozen zipimport>", line 137, in get_code
  File "<frozen zipimport>", line 700, in _get_module_code
  File "<frozen zipimport>", line 568, in _get_data
zipimport.ZipImportError: can't decompress data; zlib not available
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/Python-3.12.0/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ^^^^^^^^^^^^^^^^^
  File "/opt/Python-3.12.0/Lib/ensurepip/__init__.py", line 284, in _main
    return _bootstrap(
           ^^^^^^^^^^^
  File "/opt/Python-3.12.0/Lib/ensurepip/__init__.py", line 200, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/Python-3.12.0/Lib/ensurepip/__init__.py", line 101, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/Python-3.12.0/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/Python-3.12.0/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpl_xaqhta/pip-23.2.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpl_xaqhta\', \'--root\', \'/\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
Makefile:2024: recipe for target 'install' failed
make: *** [install] Error 1

1、The env of my computer

jihan@ubuntu:/opt/Python-3.12.0$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

jihan@ubuntu:/opt/Python-3.12.0$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           4
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               151
Model name:          12th Gen Intel(R) Core(TM) i7-12700F
Stepping:            2
CPU MHz:             2111.999
BogoMIPS:            4223.99
Hypervisor vendor:   VMware
Virtualization type: full
L1d cache:           48K
L1i cache:           32K
L2 cache:            1280K
L3 cache:            25600K
NUMA node0 CPU(s):   0-7
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves arat umip gfni vaes vpclmulqdq rdpid flush_l1d arch_capabilities

Installation process download python3.12.0 source code package

wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz

Unzip the source code

tar -zxvf Python-3.12.0.tgz

Configure compilation parameters

cd Python-3.12.0

./configure --prefix=/usr/local/Python-3.12.0

Compile the source code

make

install python

sudo make install

Then there was the error mentioned above

I tried the following methods to solve it, and found that it didn't work.

  1. Run the command to install zlib

sudo apt update sudo apt install zlib1g zlib1g-dev

  1. Uninstall the original python version and reinstall it from scratch

  2. Try a new installation command sudo make altinstall

  3. Clean up old build files sudo make clean

install podman v4.x on centos7

I have followed both of these guides to install custom versions of podman on centos7

I have had more luck with the latter but i get stuck toward the end of the process when i run either of these two commands

make BUILDTAGS="selinux seccomp"
make BUILDTAGS=""

I get this error

fatal: Not a git repository (or any of the parent directories): .git Podman is being compiled without the systemd build tag. Install libsystemd on Ubuntu or systemd-devel on rpm based distro for journald support. CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build

-ldflags ' -X github.com/containers/podman/v4/libpod/define.buildInfo=1683922470 -X github.com/containers/podman/v4/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/v4/libpod/config._etcDir=/usr/local/etc -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= '
-tags ""
-o bin/podman ./cmd/podman go build github.com/proglottis/gpgme: # pkg-config --cflags -- gpgme Package gpgme was not found in the pkg-config search path. Perhaps you should add the directory containing `gpgme.pc' to the PKG_CONFIG_PATH environment variable No package 'gpgme' found pkg-config: exit status 1

Now i have looked online and people have said it is because gpgme isn't installed. However it is. I have also followed the path of removing and reinstalling

sudo yum remove gpgme-devel -y

sudo yum -y install https://cbs.centos.org/kojifiles/packages/gpgme/1.7.1/0.el7.centos.1/x86_64/gpgme-1.7.1-0.el7.centos.1.x86_64.rpm

sudo yum -y install https://cbs.centos.org/kojifiles/packages/gpgme/1.7.1/0.el7.centos.1/x86_64/gpgme-devel-1.7.1-0.el7.centos.1.x86_64.rpm

Howevet if i search for gpgme.pc i can not not locate it

sudo find / -name gpgme*

I have struggled with this for days. Any help would be appreciated.

thanks

Why does wsl --install always yield Catastrophic Failure on my new Windows 11 Home 22H2 installation?

I am trying to start using Ubuntu 22.04 inside my Windows 11 laptop using wsl. I have gotten this to work on my desktop. However, every time I try to run 'wsl --install' (or 'wsl --install -d Ubuntu-22.04'), it ends with 'Catastrophic failure'.

My laptop is a new Lenovo LOQ.

I'll happily provide any more system details that would be useful.

Thanks in advance.

I have tried running 'wsl --install' (or 'wsl --install -d Ubuntu-22.04') using powershell, command prompt, with and without 'run as administrator', as well as 'netsh winsock reset' & reboot.

I have also checked that VM is enabled in the BIOS.

I was expecting these to work, since online users found that they worked for them (from microsoft's support pages as well as reddit), but 'Catastrophic failure' was the result each time.

❌
❌