Linux deb repo seems broken - visual-studio-code

Linux deb repo seems to contain some error:
This is what I get from apt update:
Get:14 http://packages.microsoft.com/repos/vscode stable/main amd64
Packages [156 kB] Err:14 http://packages.microsoft.com/repos/vscode
stable/main amd64 Packages File has unexpected size (156354 !=
156065). Mirror sync in progress? [IP: 13.74.252.37 80] Hashes of
expected file:
- Filesize:156065 [weak]
- SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
- SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
- SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
- MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak] Release file created at: Thu, 12 Dec 2019 19:59:19 +0000 Reading package lists...
Done E: Failed to fetch
http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2
File has unexpected size (156354 != 156065). Mirror sync in progress?
[IP: 13.74.252.37 80] Hashes of expected file:
- Filesize:156065 [weak]
- SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
- SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
- SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
- MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
The "https://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2" real file size is: 156354
the file "https://packages.microsoft.com/repos/vscode/dists/stable/InRelease" tells that the size is 156065.
Furthermore:
gpg --verify Release.gpg Release
gpg: Signature made jue 12 dic 2019 20:59:31 CET
gpg: using RSA key EB3E94ADBE1229CF
gpg: BAD signature from "Microsoft (Release signing) <gpgsecurity#microsoft.com>" [unknown]

Try the following commands. first, remove all the vscode related files in source.list.d and then update your packages.
sudo rm -rf /etc/apt/sources.list.d/vscode.list*
sudo apt-get update

Related

Git, Conda - How can I "pip install git+git:<repo>" with the new Git policies in place?

I have this conda yml file for installing dependencies and creating a new conda env.
conda_env.yml forked from https://github.com/MishaLaskin/rad:
name: rad
channels:
- defaults
dependencies:
- python=3.6
- pytorch
- torchvision
- cudatoolkit=9.2
- absl-py
- pyparsing
- pillow=6.1
- pip:
- termcolor
- git+git://github.com/deepmind/dm_control.git
- git+git://github.com/1nadequacy/dmc2gym.git
- tb-nightly
- imageio
- imageio-ffmpeg
- torchvision
- scikit-image
- tabulate
I try to run conda env create --file conda_env.yml and here's the stack trace I get.
Collecting package metadata (repodata.json): done
Solving environment: done
Installing pip dependencies: - Ran pip subprocess with arguments:
['/home/dyung6/anaconda3/envs/rad/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/dyung6/rad/condaenv.835gcx7g.requirements.txt']
Pip subprocess output:
Collecting git+git://github.com/deepmind/dm_control.git (from -r /home/dyung6/rad/condaenv.835gcx7g.requirements.txt (line 2))
Cloning git://github.com/deepmind/dm_control.git to /tmp/pip-req-build-nc4w5hv8
Pip subprocess error:
Running command git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
WARNING: Discarding git+git://github.com/deepmind/dm_control.git. Command errored out with exit status 128: git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8 Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8 Check the logs for full command output.
failed
CondaEnvException: Pip failed
Seems like the new git policies block you from doing this. Is there anyway around this?
As #torek points out, and the documentation directed to in the error message explains, the git:// protocol has phased out on GitHub. Switch to using https://, i.e., in this case:
- pip:
- git+https://github.com/deepmind/dm_control.git
- git+https://github.com/1nadequacy/dmc2gym.git
...

Rpmbuild asks for extra dependencies

I am trying to build an RPM on Centos 7. I am making a wildfly application into RPM using below SPEC file.
Name: wildfly
Version: 16.0.0.Final
Release: 1%{?dist}
Summary: WildFly Application Server
Group: System Environment/Daemons
License: LGPL 2.1
Source0: %{name}-%{version}.tar.gz
Requires(pre): shadow-utils
Requires: java >= 1.7.0
#Requires: /etc/init.d/functions
Provides: wildfly
%undefine _missing_build_ids_terminate_build
%define __arch_install_post QA_SKIP_RPATHS=2 %{__arch_install_post}
%define __jar_repack 0
%description
WildFly Application Server packaged from the binary distribution.
%prep
%setup -q -n wildfly-%{version}
%install
mkdir -p %{buildroot}/opt/wildfly
cp -R . %{buildroot}/opt/wildfly
mkdir -p %{buildroot}/var/log/wildfly
mkdir -p %{buildroot}/var/run/wildfly
#%post
#alternatives --install /etc/alternatives/wildfly wildfly /opt/wildfly 100
#%postun
#alternatives --remove wildfly /opt/wildfly
%files
%defattr(-,root,root,0755)
%files
%defattr(-,root,root,0755)
%dir /opt/wildfly
/opt/wildfly/appclient
/opt/wildfly/bin
/opt/wildfly/domain
/opt/wildfly/jboss-modules.jar
/opt/wildfly/modules
%attr(-,wildfly,wildfly) /opt/wildfly/standalone
/opt/wildfly/welcome-content
%dir /var/log/wildfly
%dir /var/run/wildfly
%doc /opt/wildfly/copyright.txt
%doc /opt/wildfly/LICENSE.txt
%doc /opt/wildfly/README.txt
%doc /opt/wildfly/docs
%changelog
* Wed Nov 24 2021
- First version being packaged
On building, i noticed that it is taking certain dependencies which i didn't defined in SPEC file.
Requires: /bin/bash /bin/sh libaio.so.1 libaio.so.1()(64bit) libaio.so.1(LIBAIO_0.1) libaio.so.1(LIBAIO_0.1)(64bit) libaio.so.1(LIBAIO_0.4) libaio.so.1(LIBAIO_0.4)(64bit) libc.so.1()(64bit) libc.so.1(SUNW_0.7)(64bit) libc.so.1(SUNW_0.9)(64bit) libc.so.6 libc.so.6()(64bit) libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.10) libc.so.6(GLIBC_2.10)(64bit) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.2.5)(64bit) libdl.so.1()(64bit) libdl.so.1(SUNW_0.7)(64bit) libdl.so.2 libdl.so.2()(64bit) libdl.so.2(GLIBC_2.0) libdl.so.2(GLIBC_2.1) libdl.so.2(GLIBC_2.2.5)(64bit) libgcc_s.so.1()(64bit) rtld(GNU_HASH)
So when I try to install this RPM on Centos 7 machine, it throws the following error.
sudo rpm -ivh wildfly-16.0.0.Final-1.el7.x86_64.rpm
error: Failed dependencies:
libaio.so.1 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.1) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.4) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1(SUNW_0.7)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1(SUNW_0.9)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.0) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.1.3) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.10) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.2) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.1(SUNW_0.7)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2(GLIBC_2.0) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2(GLIBC_2.1) is needed by wildfly-16.0.0.Final-1.el7.x86_64
How can I solve the above dependencies issue. I already installed
sudo yum install libaio -y
Still dependencies issues are coming. Please help.
You need to package libaio.so.1 in your RPM as well, and fix the RPATHs to find it. Don't use QA_SKIP_RPATHS unless you know what you're doing - they're there for a reason!
The libc and libdl problems imply you're not using the system compilers and have your own toolchain installed; that's going to be another problem. Is there a reason you can't use the stock gcc?
Further examination makes it look like you're trying to make a "fancy tarball" RPM and not doing the actual compilation with rpmbuild, which can lead to more problems - where did the binaries come from? Another CentOS box, or a different distribution? The SUNW tag in particular worries me.

How do I fix "dyld: Library not loaded" when using "wget" on a command line for the Mac?

I'm using Mac OS Big Sur (v 11.4). Wehn I try and use "wget" on the command line I get this
$ wget http://localhost:8000/user/testuser
dyld: Library not loaded: /usr/local/opt/nettle/lib/libnettle.6.dylib
Referenced from: /usr/local/bin/wget
Reason: image not found
Abort trap: 6
Even after running "brew install wget" and restarting my machine, I get the above error. How do I get "wget" to run normally? This is the path where wget is installed ...
$ which wget
/usr/local/bin/wget
Edit: In response to the answer given, here is the output ...
$ brew install homebrew/core/wget
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 6 taps (phinze/cask, homebrew/core, homebrew/cask, homebrew/services, pivotal/tap and ethereum/ethereum).
==> New Formulae
airspyhf cargo-llvm-lines cilium-cli f2 h2c
basis_universal cargo-outdated datree fst vite
bubblewrap chrpath esbuild go#1.16 vue-cli
==> Updated Formulae
Updated 883 formulae.
==> Deleted Formulae
procyon-decompiler
==> New Casks
infra infra mimestream mimestream sigmaos sigmaos
==> Updated Casks
Updated 292 casks.
==> Deleted Casks
agfeo-dashboard macintosh-explorer
agfeo-dashboard macintosh-explorer
axe-electrum modulair
axe-electrum modulair
boonzi noraswitch
boonzi noraswitch
colormunki-photo obyte
colormunki-photo obyte
dnagedcom playnow
dnagedcom playnow
dragthing plecs-standalone
dragthing plecs-standalone
eaccess privatus
eaccess privatus
elpki pro-fit
elpki pro-fit
finisher-fluxx qtum
finisher-fluxx qtum
finisher-micro qyooo
finisher-micro qyooo
finisher-neo s3stat-setup
finisher-neo s3stat-setup
flow-e scrooo
flow-e scrooo
fluxcenter simplelink-msp432e4-sdk
fluxcenter simplelink-msp432e4-sdk
fm3-edit stageplotpro
fm3-edit stageplotpro
imarisviewer tbs-studio
imarisviewer tbs-studio
instant-articles-builder thetube
instant-articles-builder thetube
instasizer unity-appletv-support-for-editor
instasizer unity-appletv-support-for-editor
jabt-flow unity-linux-il2cpp-support-for-editor
jabt-flow unity-linux-il2cpp-support-for-editor
jidusm unity-macos-il2cpp-support-for-editor
jidusm unity-macos-il2cpp-support-for-editor
lightwright wanna
lightwright wanna
locklizard-safeguard-viewer zbuc-imgur
locklizard-safeguard-viewer zbuc-imgur
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1l
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:ff8b2a965c680b4d9baccd60e799d0989e7dc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ff8b2a965c680b4d9baccd60e7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/wget/manifests/1.21.1_1
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/44061bb7a2f7bbbbbddd0901da6885f571bb53671d2ef9f3b29faa13cdc50ac7--wget-1.21.1_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:307217b813330eda365570d7540aa2da69c678b6c4b7
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/2229e2908e6815b9ceac4ac5af316c49215750a1c6d0bdc10b3946b273ee648d--wget--1.21.1_1.big_sur.bottle.tar.gz
==> Installing dependencies for wget: openssl#1.1
==> Installing wget dependency: openssl#1.1
==> Pouring openssl#1.1--1.1.1l.big_sur.bottle.tar.gz
Error: Directory not empty # dir_s_rmdir - /usr/local/opt/openssl
That's interesting. wget from homebrew-core, the default package repo for Homebrew, doesn't depend on nettle at all.
Where did your get wget installed from? Uninstall wget and reinstall it back from the default pkg repo.
brew uninstall -f wget
# tell brew to get wget from homebrew-core explicitly
brew install homebrew/core/wget
Don't know if you managed to fix this, but I had a similar issue, found fix here: https://github.com/Homebrew/discussions/discussions/3920
brew reinstall z3

Ganglia installations fails in centos7 (rrd_create in -lrrd... no)

When i try to install ganglia in centos7, I am getting following error
Configuring libmetrics ...
checking for pthread_create in -lpthread... yes
checking for pthread_create in -lpthreads... no
checking rrd.h usability... yes
checking rrd.h presence... yes
checking for rrd.h... yes
checking for rrd_create in -lrrd... no
Trying harder by including the X library path
checking for rrd_create in -lrrd... no
But I have rrd tool already installed
rrdtool -v
RRDtool 1.4.8 Copyright 1997-2013 by Tobias Oetiker <tobi#oetiker.ch>
Compiled Nov 20 2015 19:23:48
configure command:
./configure LDFLAGS="-L/usr/lib64" --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-gmetad --enable-status --sysconfdir=/etc/ganglia
Answer:
On looking at config.log file we see
/usr/lib64/libEGL.so.1: undefined reference to `drmFreeDevice'
symbols of libEGL.so are not available. hence did update which fixed the issue.
sudo yum -y update -- fixed the issue

installation of vmware workstation 10.0.1 on Centos 7

I am attempting to install VMware workstation 10.0.1 on a new installation of CEntOS version 7 (kernel version 3.10.0).
I have copied the vmnet.tar file from /lib/vmware/modules/source to my home directory for debugging. The building of the vmnet module fails with the following error message:
/bin/make -j12 auto-build HEADER_DIR=/lib/modules/3.10.0-123.el7.x86_64/build/include CC=/bin/gcc IS_GCC_3=no
Using 2.6.x kernel build system.
/bin/make -C /lib/modules/3.10.0-123.el7.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
CC [M] /home/******/junk/vmnet-only/filter.o
/home/******/junk/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’
VNetFilterHookFn (unsigned int hooknum, // IN:
^
/home/******/junk/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
static nf_hookfn VNetFilterHookFn;
^
/home/******/junk/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
/home/******/junk/vmnet-only/filter.c:206:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
VNetFilterHookFn (unsigned int hooknum, // IN:
^
make[2]: *** [/home/******/junk/vmnet-only/filter.o] Error 1
make[1]: *** [_module_/home/******/junk/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
make: *** [vmnet.ko] Error 2
I've googled a bit, but I didn't find anything specific to WS 10.0.1, although I did find some patches for the installation of WS 10.0.3 but it appears that these patches would be ineffective for WS 10.0.1. I believe this because the macro that they are modifying in the patch (KERNEL_VERSION) is no in the offending file, filter.c.
Anyone have a link to a solution to this problem.
Thanks!
I had a similar problem. Found this solution and worked:
cd /usr/lib/vmware/modules/source
tar -xvf vmnet.tar
cd vmnet-only
vi filter.c
Go to lines 206 and 259 and replace the string
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
By
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)
Then:
cd ..
tar -uvf vmnet.tar vmnet-only
rm -rf vmnet-only
Then run vmware workstation again and it should be able to install the kernel modules.
Good luck!
user3910091 has the right answer. This also works on 10.0.3 on RHEL7. The strange thing is that it appears they patched this in 10.0.3, but their patch uses >= and the filter options are in the opposite order, but the same minor kernel version changes appear to fix it.
cd /usr/lib/vmware/modules/source
tar -xvf vmnet.tar
cd vmnet-only
vi filter.c
Go to around lines 206 and 259 and replace the string
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
By
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)
Then:
cd ..
tar -uvf vmnet.tar vmnet-only
rm -rf vmnet-only
Then run /usr/bin/vmware again and it should be able to install the kernel modules.